Convert the following while loop to the corresponding for loop: int m = 5, n = 10; while (n >= 1) { System.out.println(m*n); n--; }
Advertisements
प्रश्न
Convert the following while loop to the corresponding for loop:
int m = 5, n = 10;
while (n >= 1)
{
System.out.println(m*n);
n--;
}थोडक्यात उत्तर
टीपा लिहा
Advertisements
उत्तर १
for (int m=5, n=10; n>=1; n – – )
{
System.out.println (m*n);
}
shaalaa.com
उत्तर २
int n, m = 5;
for (n = 10; n >= 1; n--)
System.out.println(m * n); shaalaa.com
Introduction of Nested Loop
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
