Write an algorithm to find greatest among three numbers
Answers
Answered by
188
step 1:start
step 2:input a, b, c
step 3:if a>bgo to step 4,otherwise go to step 5
step 4:if a>c go to step 6,otherwise go to step 8
step 5:ifb>c go to step 7,otherwise go to step 8
step 6:output "a is the largest ",go to step 9
Start 7 : Output "b is the largest", goto step 9
Start 8 : Output " c is the largest", goto step 9
Start 9 : Stop
I hope it helps u....
step 2:input a, b, c
step 3:if a>bgo to step 4,otherwise go to step 5
step 4:if a>c go to step 6,otherwise go to step 8
step 5:ifb>c go to step 7,otherwise go to step 8
step 6:output "a is the largest ",go to step 9
Start 7 : Output "b is the largest", goto step 9
Start 8 : Output " c is the largest", goto step 9
Start 9 : Stop
I hope it helps u....
Answered by
1
THE ALGORITHM TO FIND GREATEST AMONG THREE NUMBERS-
STEP 1: BEGIN
STEP 2: Define three variables, , , and .
STEP 3: If , print is the greatest.
STEP 4: If , print is the greatest.
STEP 5: Else, print is the greatest.
STEP 6: END
#SPJ2
Similar questions