Computer Science, asked by rd784737, 1 month ago

Predict the output for the question.​

Attachments:

Answers

Answered by anindyaadhikari13
3

Required Answer:-

Question:

  • Predict the output of the given program.

Answer:

The output of the given program is,

1

4

9

16

25

36

47

64

81

100

Explanation:

Given códe snippet,

for(int i=1,j=1 ; i<=10 ; i++,j++) {

System.out.println(i*j);

}

Initially,

  • i = 1 and,
  • j = 1

The above códe iterates the loop if i<=10 is true.

After each iteration, the program displays the value of i*j. As i = j, so it prints square of all the numbers from 1 to 10.

Answered by TheUntrustworthy
25

1

4

9

16

25

36

49

64

81

100

Therefore 100 will be the answer

\pink{▬▬▬▬▬}\red{Mark}\green{As}\blue{Brainliest}\orange{▬▬▬▬▬}

{\fcolorbox{blue}{black}{\orange{\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\: DecentMortal\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:}}}

Similar questions