Question: Write a program that finds both the largest and smallest of several integers. The process of finding both the largest and smallest is used frequently

Write a program that finds both the largest and

Write a program that finds both the largest and smallest of several integers. The process of finding both the largest and smallest is used frequently in computer applications. For example, a program that determines the winner and loser of a sales contest would input the number of units sold by each salesperson. The salesperson who sells the most units wins the contest; the salesperson who sells the least units loses the contest. Write a pseudocode program, then a Java program that inputs a series of 10 integers and determines and prints the largest integer and the smallest integer. Your program should use at least the following four variables: a) counter: A counter to count to 10 (i.e., to keep track of how many numbers have been input and to determine when all 10 numbers have been processed). b) number: The integer most recently input by the user. c) largest: The largest number found so far. d) smallest: The smallest number found so far. run: Enter number: 10 Enter number: 20 Enter number: 30 Enter number: 40 Enter number: 50 Enter number: 60 Enter number: 70 Enter number: 80 Enter number: 90 Enter number: 100 Largest number is 100 Smallest number is 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!