An algorithm for comparing the sizes of two real numbers a and B is as follows: ditto

An algorithm for comparing the sizes of two real numbers a and B is as follows: ditto


start
Enter a
Enter B
A > b?
Yes output a > b
No output a



How to determine the size relationship between two real numbers a and B
1. From the number axis 2. From the difference between two numbers


On the number axis, who is on the right is bigger than who is on the right
If the difference between two numbers is A-B > 0, then a > B
If A-B = 0, then a = B
a-b



Let a and B be any two real numbers, if A-B > 0, then a B; if A-B = 0, then a B; if A-B < 0, then a B
Let a and B be any two real numbers, if A-B > 0, then a B; if A-B = 0, then a B; if A-B < 0, then a B


If A-B > 0, then a > b; if A-B = 0, then a = B; if A-B < 0, then a < B
Just move the item