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.
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
Comments
Leave a comment