मराठी

Convert the following do...while loop to for loop: int x = - 10;do

Advertisements

प्रश्न

Convert the following do...while loop to for loop:

int x = - 10;
do

{x - -;
System.out.print(x);
}while(r >= 1);
थोडक्यात उत्तर
Advertisements

उत्तर

Using for loop:

for(int x = 9; x >= 0; x--)
{
     System.out.print(x);
}
shaalaa.com
Introduction of Nested Loop
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2022-2023 (March) Official
Advertisements
Share
Notifications



      Forgot password?
Use app×