हिंदी

Analyze the Given Program Segment and Answer the Following Questions : For(Int I=3;I< =4;I+ +) { For(Int J=2;J<I;J+ +) { System.Out.Print(” “); } System.Out.Println(“Win”); }

Advertisements
Advertisements

प्रश्न

Analyze the given program segment and answer the following questions : 

for(int i = 3; i <= 4; i++){
    for(int j = 2; j <i; j++){
        System.out.print("");
    }
    System.out.println("WIN");
}

(i) How many times does the inner loop execute ?
(ii) Write the output of the program segment.

एक पंक्ति में उत्तर
Advertisements

उत्तर

(i) 3 times
(ii) WIN WIN

shaalaa.com
Introduction of Nested Loop
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2016-2017 (March) Set 1
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×