Question: Write a Java program to accept positive integers from the user at the command line. The user can enter as many integers as they like.
Write a Java program to accept positive integers from the user at the command line. The user can enter as many integers as they like. Use -1 as a sentinel. Keep track of the highest number (the max) they enter. When done output: "The max was X" where X is this highest integer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
