DoWhileLoop Program
Description
This program uses several do ... while loops to print a sequence of numbers and calculates the sum and average of these numbers.Associated Concepts:
do ... while loop
Algorithm:
Input a positive integer n
Use a do ... while loop to print every number from n to 50,
and calculate the sum and average of these numbers
Use another do ... while loop to print every number from 50 to n,
and calculate the sum and average of these numbers
Use another do ... while loop print every even number from n to 50,
and calculate the sum and average of these numbers
Use a do ... while loop to print every number from n to 50,
and calculate the sum and average of these numbers
Use another do ... while loop to print every number from 50 to n,
and calculate the sum and average of these numbers
Use another do ... while loop print every even number from n to 50,
and calculate the sum and average of these numbers