- #1
- 334
- 1
Write an algorithm to find the largest of the four numbers A, B, C, D.
1: See if A is greater than the three of the rest, if YES, then go to Step 5
2: See if B is greater than the two of the rest, if YES, then go to Step 5
3: See if C is greater than the last one, if YES, then go to Step 5
4: The last one is the largest, proceed to Step 5 to end the algorithm
5: END
Do you find the above algorithm correct? Please let me know.
1: See if A is greater than the three of the rest, if YES, then go to Step 5
2: See if B is greater than the two of the rest, if YES, then go to Step 5
3: See if C is greater than the last one, if YES, then go to Step 5
4: The last one is the largest, proceed to Step 5 to end the algorithm
5: END
Do you find the above algorithm correct? Please let me know.