Computer Science, asked by pinkyhembram5675, 1 year ago

Write an algorithm to find greatest among three numbers

Answers

Answered by jeevan375
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....
Answered by sourasghotekar123
1

THE ALGORITHM TO FIND GREATEST AMONG THREE NUMBERS-

STEP 1: BEGIN

STEP 2: Define three variables, X, Y, and Z.

STEP 3: If X > Y\ \&\&\ Y > X, print X is the greatest.

STEP 4: If Y > Z\ \&\&\ Y > X, print Y is the greatest.

STEP 5: Else, print Z is the greatest.

STEP 6: END

#SPJ2

Similar questions