मराठी

Rewrite the following do while program segment using for: x = 10; y = 20; do { x++; y++; }while (x<=20); System.out.println(x*y); - Computer Applications

Advertisements
Advertisements

प्रश्न

Rewrite the following do while program segment using for:

x = 10; y = 20;
do
{
   x++;
   y++;
}while (x<=20);
System.out.println(x*y);
टीपा लिहा

उत्तर

int x,y;
for(x=10, y=20; x<=20;x++,y++);
System.out.println(x*y);
shaalaa.com
Output Statement in Java Programming
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2023-2024 (February) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×