Asked by Anonymous
Submit pseudocode and a flowchart for the following programming exercise:
Largest and Smallest
Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.
Largest and Smallest
Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.
Answers
Answered by
MathMate
I'll give you a skeleton. Fill in the meat and post what you have.
int max=-99, min=-99, num;
do
input num
if num==-99 then exit loop endif
if max=-99 then ..... endif
if num>max then ..... endif
if num<min then ..... endif
loop
Display max, min.
int max=-99, min=-99, num;
do
input num
if num==-99 then exit loop endif
if max=-99 then ..... endif
if num>max then ..... endif
if num<min then ..... endif
loop
Display max, min.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.