Write a Java program to enter the numbers till the user wants and at the end the program should display the largest and smallest numbers entered
belongs to collection: Loop programs in Java with an examples
All Answers
total answers (1)
belongs to collection: Loop programs in Java with an examples
total answers (1)
In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
Result:
Enter the number 5
Do you want to continue y/n? y
Enter the number 2
Do you want to continue y/n? y
Enter the number 10
Do you want to continue y/n? n
Largest number: 10
Smallest number: 2
need an explanation for this answer? contact us directly to get an explanation for this answer