Question: 4.11 Squared Loops Create an int variable called initial_value and get its value from the user with Scanner. Write a definite loop (for loop) that

4.11 Squared Loops

Create an int variable called initial_value and get its value from the user with Scanner. Write a definite loop (for loop) that starts a counter at initial_value and add one to the counter each iteration. Iterate the loop 10 times and print the value of its counter to the power of 2. Do not use println, only print.

For example, if the input is 5, then the output is:

5^2=25 6^2=36 7^2=49 8^2=64 9^2=81 10^2=100 11^2=121 12^2=144 13^2=169 14^2=196

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!