Question: Using c++ to answer these two problems 18. one numb a variable Write a program segment (including a while loop) that reads er into a
18. one numb a variable Write a program segment (including a while loop) that reads er into a variable named n and reads another number into called maxPower. Then your statements should raise n to each power 0, 1, 2, , maxPower, and print a table like the following (suppose n is 2 and maxPower is 4): n raised to power n power 2 2 2 2 2 2 16 19. Redo problem 18 using a for loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
