Question: Write a program that outputs the sequence of numbers: 1 , 4 , 9 , 1 6 , 2 5 , 3 6 , 4

Write a program that outputs the sequence of numbers: 1,4,9,16,25,36,49,64,81,100,121
public class Main {
public static void main(String[] args){
for(int i=1; i<=11; i++){
System.out.println(i*i);
}
}
}
Write a program for problem #3 that does not use the multiplication operator (*).
(Hint: look at the difference between each number in the sequence of squares...)

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!