How many times is the printin statement executed?
for (int i = 1; i <= 5; i++)
for (int j = 1; j <= i; j++)
System.out.println(i * j);
Answers
Answered by
2
Explanation:
Outer loop : 5 times and
Inner loop : 5 times
totally : 5×5=25 tmes
out put are : 1
2
9
16
25
Similar questions