Reference no: EM132196182
Write a c++ program that does the following-
a) prints out the even integers between 2 and 100.
b) prints out the integers that are multiples of 3 from 99 down to 3.
c) prints out the integers between 2 and 1,048,576 (2^(20)) that are integer powers of 2.
d) prints out the integers between 1,048,576 down to 2 that are integer powers of 2.
*In the program, use a for, do-while, and while loop at leat once (one loop per operation)
*program is written in only one "int main" function, not sepate functions
*for each of the 4 operations in the program, include a counter variable inside the respective loop that counts how many numbers are printed out. Report that result as well.
*The results for operations a and b should be printed out with 10 integers per line, right justified in a 5 byte field.for example-
2 4 6 8 10 12 14 16 18 20
22 24 26 28 30 32 34 36 38 40