This is a pseudocode to find greatest among 2 numbers.

Here the user enters two numbers and the greatest among the two numbers is found by comparing the two numbers and the result is displayed.

1 2 3 4 5 6 7 8 9 10 11 12 |
Write "Please enter a first number" Read num1 Write "Please enter a secondnumber" Read num2 If (num1>num2) Write number1 is the Greatest Number else If (num2>num1) Write number2 is the Greatest Number else Write "number1=number2" |

we are finding the greatest value among 2 numbers. If else condition statement is used to compare the two numbers and print the greatest value among 2 numbers.