Advertisements
Advertisements
Question
Predict the output:
int i, j;
for (j = 1; j <= 5; j += 2)
{
for (k = 1; k <= j; k++)
System.out.print(k);
System.out.println();
}
Answer in Brief
Solution
1
123
12345
shaalaa.com
Is there an error in this question or solution?