Advertisements
Advertisements
Question
Write the output of the following program code.
int r=0, c=0;
for (r=6; r<=10; r++)
{
for(c=6; c<=r; c++)
{
System.out.print(" "+c);
}
System.out.println ();
}Very Short Answer
Advertisements
Solution
| 6 | ||||
| 6 | 7 | |||
| 6 | 7 | 8 | ||
| 6 | 7 | 8 | 9 | |
| 6 | 7 | 8 | 9 | 10 |
shaalaa.com
Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 48]
