1. Write a program in C++ to find the square of the numbers from 1 to 100 using (i) for loop (ii) while-do loop (iii) do-while loop The output should be as follows: Number Square . . . 2. Modify the...




1. Write a program in C++ to find the square of the numbers from 1 to 100 using


(i) for loop


(ii) while-do loop


(iii) do-while loop


The output should be as follows:


Number Square


. . .


2. Modify the above program so that it prints only the squares of numbers (not the numbers) from 1 to 125, each on its own line. It should print 1 4 9 16 25, and so on.












May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here