Question
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
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)
*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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started