मराठी

Find the errors in the following program snippet: for (int k = 1; k <= 10; k--) System.out.println(k); - Computer Applications

Advertisements
Advertisements

प्रश्न

Find the errors in the following program snippet: 

for (int k = 1; k <= 10; k--) 
      System.out.println(k);
एका वाक्यात उत्तर

उत्तर

In the loop, the update expression should be k++.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.09: Iterative Constructs in Java - Review Insight [पृष्ठ १२०]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.09 Iterative Constructs in Java
Review Insight | Q 6. | पृष्ठ १२०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×