Draw a flowchart that represents assignment of 10 to X if X<Y otherwise 5 will be assigned to X
provide
(a) an algorithm
(b) flowchart
(c) pseudocode
(1) illustrate the assignment from 10 to x
If x<y otherwise 5 Is assigned to x
(2) compute the sum of the series ;
f(x) = 1+x+x^2+x^3+...........+x^n
Write a program that takes as input two numbers n (integer) and x (double), and prints arctan(x) evaluated by taking n terms of the Taylor series (using x0 =0):
arctan(x) = x - x 3 /3 + x 5 /5 - x 7 /7 …
To care of numerical accuracy and rounding off we have created a print(x) function. Please use this to print your final answer. Suppose your answer is in a variable called ans, then print it to screen using “print(ans);” and NOT “cout << ans;”.
Please print a newline( using “cout<<endl;” is one way to do it) after printing your answer
Write a program to keep track of a match consisting of a series of games between two people: player A and player B, and report the outcome. The input consists of a sequence of letters A or B. If the input is A, it indicates that A has won a game. If it is B, then it indicates B has won a game. The first player to win 5 or more games with a difference of 2 or more games between him and his opponent wins the match. If no player wins the match in 20 games then the match is declared a tie after these 20 games have been played
Provide
a) An algorithm
b) Flow chart
c)Pseudocode
(1). To illustrate the assignment of 10 to X if X < Y otherwise 5 is assigned to X.
(2). To compute the sum of the series: 𝑓(𝑥) = 1 + 𝑥 + 𝑥 2 + 𝑥 3 + … + 𝑥n
Write an assembly program for multiplication of two eight bit no. at 4000H=1BH and 4001H=3AH and save result at 4002H and 4003H.
Describe the various technologies that enables users to send high volume data over any network
A salesman wants to travel among 4 or n cities. He wishes to visit maximum or all cities in one day. The order of visiting different cities is not important, but his point of consideration is to minimize distance travelled. In a map this scenario can be described in this way; Cities are represented by nodes, and distance is represented as edges.
Suppose he starts travel from source city ‘A’, visit different cities in the following ways:
Considering the above scenario, you have to choose a suitable algorithm from the following list of algorithms which you think is the best algorithm for the salesman to cover maximum cities by traveling minimum distance.
Homework;
Please create a sample program using try, catch and finally if the user will input incorrect value (user can enter number, string character, etc...) -
Write an assembly program for multiplication of two eight bit no. at 4000H=1BH and 4001H=3AH and save result at 4002H and 4003H.