Answer to Question #256680 in Algorithms for Dion Martins

Question #256680

Do the necessary planning (IPO) and write an algorithm in pseudo code for the following:

1. Write an algorithm to allow users to enter a quantity of numbers until a negative number is entered. Then display the highest and lowest number entered.

1.1 Use a while-loop to determine the answer.


1
Expert's answer
2021-10-27T05:43:13-0400

IPO





Algorithm:


Start
   Declare varaible integer number = 1	
   Declare varaible integer highest = -100000
   Declare varaible integer lowest = 100000 
   while number>=0
	Read number
        if number>=0 then
	   if number> highest then
	        highest = number
	    if number < lowest then
		lowest = number
	    end if
	end if
    Display the highest number 
    Display the lowest number 
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS