MENU
Question -

Write an algorithm to find the largest among three numbers.



Answer -

The algorithm is defined as :

Step 1: Read X, Y, Z.
Step 2 : If X > Y continue step 5.
Step 3 : If Y>Z then print тАЬY is the largest тАЬand continue step 7.
Step 4 : Continue step 6.
Step 5 : If X>Z then print тАЬX is the largest тАЬand continue step 7.
Step 6 : Print тАЬZ is largestтАЭ.
Step 7: End.

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×