Write an algorithm and draw a flowchart to find the largest among the three numbers entered by the user.
Answers
Answered by
31
Answer:
Yes! Here is your answer!
Explanation:
Step 1 : Start
Start 2 : Input a, b, c
Start 3 : if a > b goto step 4, otherwise go to step 5
Start 4 : if a > c goto step 6, otherwise go to step 8
Start 5 : if b > c goto step 7, otherwise go to step 8
Start 6 : Output "a is the largest", go to step 9
Start 7 : Output "b is the largest", go to step 9
Start 8 : Output " c is the largest", go to step 9
Start 9 : Stop
Answered by
17
Algorithm:
1.Start
2. Read the three numbers to be compared, as A, B and C.
3. Check if A is greater than B.
- If true, then check if A is greater than C.
- If true, print 'A' as the greatest number.
- If false, print 'C' as the greatest number.
- If false, then check if B is greater than C.
- If true, print 'B' as the greatest number.
- If false, print 'C' as the greatest number.
4. End
Attachments:
Similar questions