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 a program that first reads an integer for the array size,
then reads characters into the array, and displays the consonants (i.e., a character
is displayed only if it a consonant). (Hint: Read a character and store it to an array
if it is not a vowel. If the character is a vowel, discard it. After the input, the array
contains only the consonants.)
Write a program that first reads an integer for the array size, then
reads numbers into the array, counts the even numbers and the odd numbers and
displays them.
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 loo
Write a menu driven program that achieves the following:
Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.
Ex: If the input is:
0 (or less than 0), the output is:
No change Ex: If the input is:
45the output is:
1 Quarter
2 Dimes Write a program whose inputs are three integers, and whose output is the smallest of the three values.
Ex: If the input is:
7 15 3the output is:
3Write a program that asks the user to enter two numbers, obtains the two numbers from the user, and prints out the sum, product, difference, quotient, and remainder of the two numbers.
Write a program c++ that has a class MathUtils which has method that perform various mathematical functions using recursion.
class MathUtils
{
public:
int factorial ( int n)
{
//to be implemented
}
int power ( int base, int exp)
{
// to be implemented
}
void triple (int[] a)
{
//to be implemented
}
}
a. The factorial method returns the factorial of the number given. Implement factorial using recursion.
b. The power method raises base to the power exp. Implement power using recursion.
c. The triple method triples every element in the given array. Implement triple using recursion, adding a helper method if necessary.
Note:
No global decelerations
Test run in main
Write a menu driven program that achieves the following:
a. Takes student’s information from the user and adds such a student into Mark Sheet.
b. Takes a student number from the user and update such a student’s information.
c. Takes a student number from the user and delete such a student from Mark Sheet.
d. Generate or re-generate individual student report files.
e. Write a short report on the approach you used to solve the problem in hand.