हिंदी

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×