Advertisements
Advertisements
Question
Write the output of the following program code.
int r=0, с=0;
for (r=1; r<=6; r++)
{
for(c=6; с>= r; c--)
{
System.out.print(" "+c) ;
}
System.out.println ();
}Very Short Answer
Advertisements
Solution
| 6 | 5 | 4 | 3 | 2 | 1 |
| 6 | 5 | 4 | 3 | 2 | |
| 6 | 5 | 4 | 3 | ||
| 6 | 5 | 4 | |||
| 6 | 5 | ||||
| 1 | |||||
shaalaa.com
Is there an error in this question or solution?
