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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here