Questions: 652

Answers by our Experts: 652

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

write an algorithm that accept TV type (CRT/LCD) from the user, if the user chooses LCD ask of the size (32/42). if it is 42 give the user a 20% discount else 5% discount if he chooses 32.


Write a program using pseudocode to create four functions add(a,b) to add a and b then return the result, similarly sub(a,b), mult(a,b), div(a,b) to perform mathematical operations. Provide a menu to choose which calculation to perform. Parameters a and b are inputs from user.



Given two numbers X and Y, create a program that determines the difference between X and Y using if-else. If X - Y is negative, compute R = X + Y; if X - Y is zero, compute R = 2X + 2Y; and if X - Y is positive, compute R = X * Y. Print the values of X, Y, and R.


The population of a town A is less than the population of town B.However, the population of



algorithmoutputs after how many years the population of town A will be greater than or equal to



flowchartthat prompts the user to enter the population and growth rate of each town. The



Population of town A =5000, growth rate of town A = 4%, populationof town B = 8000, and



town A is growing faster than the population of town B. Write algorithm usingpseudocodeand



the population of town B and the populations of both the towns at that time. (A sample input is:



growth rate of town B =2%)

Write algorithm using pseudocode and flowchart that uses while loops to perform the


following steps:


i. Prompt the user to input two integers: firstNum and secondNum note that firstNum


must be less than secondNum.


ii. Output all odd numbers between firstNum and secondNum.


iii. Output the sum of all even numbers between firstNum and secondNum.


iv. Output the numbers and their squares between firstNum and secondNum.


v. Output the sum of the square of the odd numbers between firstNum and secondNum.


b. Redo Exercise (a) using for loops.


c. Redo Exercise (a) using do. . .while loops.


Write algorithm using pseudocode and flowchart that uses while loops to perform the


following steps:


i. Prompt the user to input two integers: firstNum and secondNum note that firstNum


must be less than secondNum.


ii. Output all odd numbers between firstNum and secondNum.


iii. Output the sum of all even numbers between firstNum and secondNum.


iv. Output the numbers and their squares between firstNum and secondNum.


v. Output the sum of the square of the odd numbers between firstNum and secondNum.


b. Redo Exercise (a) using for loops.


c. Redo Exercise (a) using do. . .while loops.


The population of a town A is less than the population of town B. However, the population of 

town A is growing faster than the population of town B. Write algorithm using pseudocode and 

flowchart that prompts the user to enter the population and growth rate of each town. The 

algorithm outputs after how many years the population of town A will be greater than or equal to 

the population of town B and the populations of both the towns at that time. (A sample input is: 

Population of town A = 5000, growth rate of town A = 4%, population of town B = 8000, and 

growth rate of town B =2%)


a. Write algorithm using pseudocode and flowchart that uses while loops to perform the 

following steps:

i. Prompt the user to input two integers: firstNum and secondNum note that firstNum 

must be less than secondNum.

ii. Output all odd numbers between firstNum and secondNum.

iii. Output the sum of all even numbers between firstNum and secondNum.

iv. Output the numbers and their squares between firstNum and secondNum.

v. Output the sum of the square of the odd numbers between firstNum and secondNum.

b. Redo Exercise (a) using for loops.

c. Redo Exercise (a) using do. . .while loops.


Write the algorithms to display the Fibonacci series and the factorial value for a given number using Pseudo code.


Merge two sorted arrays shown below

[11, 31, 35, 43, 61, 79] and [12, 14, 15, 37, 41, 73]


LATEST TUTORIALS
APPROVED BY CLIENTS