This program uses a do-while loop to display the numbers from 1 to 50. It initializes an integer variable n to 1, prints n, increments n by 1, and repeats this in the do block while n is less than or equal to 50, displaying all numbers up to 50.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
70 views1 page
Practical No 6 (JPR)
This program uses a do-while loop to display the numbers from 1 to 50. It initializes an integer variable n to 1, prints n, increments n by 1, and repeats this in the do block while n is less than or equal to 50, displaying all numbers up to 50.
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab