Java Machine Problem 2

The process of finding the largest value (i.e., the maximum of a group of vaue) is used frequently in compute applications. For example, a program that determines the winner sales contest would input the number of units sold by each salesperson. The salesperson who sells the most units wins the contest. Write a java application the inputs a series of 10 single-digit numbers as characters, and determine and prints the largest of the numbers.

Hint: Your program should use three variables as follows:

counter: A counter to count to 10 (i.e., to keep track of how many numbers have been inputted, and to determine when all 10 numbers have been processed)

number: The current digit input to the program.

largest: The largest number found so far.

Post a Comment

0 Comments