Computer Science, asked by ilyaskhan1223, 1 month ago

write a program to produce the following output
0
0 1
0 1 4
0 1 4 9
0 1 4 9 16
0 1 4 9 16 25

Answers

Answered by prosunny8085
0

Answer:

for(int i=0; i<=5; i++ )

{

int temp;

for(int j=0; j<=i; j++ )

{

temp=j;

System.out.print( temp*temp );

}

System.out.println();

}

Similar questions