Can you solve this C program by using Function?
Q1. Write a C program to ring the computer bell at any number of
times you specify. Use the system clock as a delay, you need to
include the time header file.
How can you generate a circle of center C and radius R using
Bresenhem’s algorithm? Also, make flow chart for this algorithm.
Write a C/C++ program to implement Bresenhem’s circle
algorithm.
How much time does an algorithm take to solve a problem of size
n if this algorithm uses 2n2 + 2n operations, each requiring 10-8
seconds, with these values of n?
a) 10:
b) 20:
c) 50:
d) 100
Using Java implement a searching algorithm to
solve the following problem (please specify the searching algorithm
being used)
Requirements
Choose one problem with an algorithm and implement it. You
should show and explain the result whatever you got. I recommend
using N-Queen problem (at least N=8 or more) or any simple perfect
games.
For example,
- N-Queen problem with hill climbing
- N-Queen problem with simulated annealing
- N-Queen problem with genetic algorithm
- Tic-Tac-Toe with Minimax
Can someone solve these two questions for an intro c++
course?
1.
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
char twostrings[] = "Hello! CS103L!";
char* p1;
char* p2;
//fill in the code required to print out Hello! and CS103L! on different lines
//Hint: modify one character in the original string and set p1 and p2 correctly
//Do not make any copies or new strings or arrays. You only need to modify the original array.
//
cout...
This project is much easier if you create an algorithm.
If you understand the content of the Concurrency Basics
Tutorial, this Project will be easy. If not, 40 hours of working on
it won't help. I suggest reading the instructions slowly and
carefully before reading the tutorial so that you will notice what
is needed as you read. Then read them again, slowly and
carefully.
Using the concepts from the Concurrency Basics Tutorial I
provided in Modules, write a program...
Develop an algorithm and implement Optimal Page Replacement
algorithm using C++. Determine the number of page faults and page
hits by considering the Frame size=4, ReferenceString:2 4 6 7 8 2 4
9 13 9 2 7 2 6 1 4 9 2
Question 1: Using Python 3 Create an
algorithm
The goal is to create an algorithm that can sort a
singly-linked-list with Merge-sort. The program should read
integers from file (hw-extra.txt) and create an unsorted
singly-linked list. Then, the list should be sorted using merge
sort algorithm. The merge-sort function should take the head of a
linked list, and the size of the linked list as parameters.
hw-extra.txt provided:
37 32 96 2 25 71 432 132 76 243 6 32...
a. Using the Euclidean Algorithm and Extended Euclidean
Algorithm, show that gcd(99; 5) = 1 and find integers s1 and t1
such that 5s1 + 99t1 = 1.
[Hint: You should find that 5(20) + 99(?1) = 1]
b. Solve the congruence 5x 17 (mod 99)
c. Using the Chinese Remainder Theorem, solve the congruence
x 3 (mod 5)
x 42 (mod 99)
d. Using the Chinese Remainder Theorem, solve the congruence
x 3 (mod 5)
x 6 (mod 9)...