write an algorithm to read two number then display the larger number
Answers
Answered by
0
Answer:
1) read first number
(2) read second number
(3) if first is greater, display second, else display first
The second and third can be done the same way:
(1) read first number and set highestSeenSoFar to it
(2) read another number, and if greater than highestSeenSoFar, set highesSeenSoFar to the new number
(3) repeat step 2 (twice for 3 numbers total, 99 times for 100 numbers)
(4) display highestSeenSoFar
Explanation:
Answered by
1
Explanation:
STEP 1: START
STEP 2: INITIALISE TWO VARIABLE A AND B
STEP 3: ENTER TWO NUMBERS
STEP 4: IF(A>B)
STEP 5: PRINT A IS LARGEST
STEP 6: OTHERWISE
STEP 7: PRINT B IS LARGEST
STEP 8: END
Similar questions