Question: How do you do this in Java? 5 -(Code only) Write a program that reads input numbers until the user types -1 to stop providing
How do you do this in Java?
5 -(Code only) Write a program that reads input numbers until the user types -1 to stop providing new numbers. Then, the program should output the smallest and the largest numbers provided by the user. Example Output: Enter number: 5 Enter number: 6 Enter number: 100 Enter number: -5 Enter number: 60 Enter a number:-1 Smallest number is-5 and largest is 100. Name your class Hw2pr5 and your file Hw2pr5.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
