Assignment: #loops Due: 03/25/2017 Points: 5

Specification

Part 0

Use a for statement to print, in ascending order, the first ten even numbers starting with two.

Use a do-while statement to print, in descending order, the odd numbers starting with nineteen and ending with one.

Use a while statement to print the products of consecutive numbers starting with zero times one and ending with nine times ten. (0*1, 1*2, 2*3, 3*4, ...).

Printed numbers should be comma separated with no space after the commas. The last number in each printed sequence should end with a comma.

Part 0 of this program produces the following three lines of output.

2,4,6,8,10,12,14,16,18,20,
19,17,15,13,11,9,7,5,3,1,
0,2,6,12,20,30,42,56,72,90,
Part 1

Using a repetition control statement of your choice, print all the numbers between 10 and 95 (inclusive) that are evenly divisible by five. Print eight numbers per line with each number separated by a space.

Part 1 of this program produces the following three lines of output.

10 15 20 25 30 35 40 45 
50 55 60 65 70 75 80 85
90 95