हिंदी

Write the output of the following program code. int r=0, c=0; for (r=1; r<=5; r++) { for(c=1; c<=r; c++) { System.out.print(" "+c); }System.out.println (); }

Advertisements
Advertisements

प्रश्न

Write the output of the following program code.

int r=0, c=0;
for (r=1; r<=5; r++)
{
    for(c=1; c<=r; c++)
    {
      System.out.print(" "+c);
    }
      System.out.println ();
}
अति संक्षिप्त उत्तर
Advertisements

उत्तर

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Revision of Class 9 Syllabus - Exercises [पृष्ठ ४८]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 1 Revision of Class 9 Syllabus
Exercises | Q 7. (ii) | पृष्ठ ४८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×