Question One
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.
Comments
Leave a comment