English

Convert the following do-while loop to a for loop: int x=−10; do {x−−; System.out.print(x); }while (r>=1);

Advertisements
Advertisements

Question

Convert the following do-while loop to a for loop:

int x=−10;
do
{x−−;
System.out.print(x);
}while (r>=1);
Code Writing
Advertisements

Solution

int x=10;
do
System.out.print(x);
}while (x>=1);'
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 50]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 1 Revision of Class 9 Syllabus
Exercises | Q 15. | Page 50
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×