Tag Archives: less than

Determine equality of 2 numbers

C Programming Examples – Comparing 2 numbers – Simple If Else if Else problem

Problem: Create a program that will ask a user to enter 2 numbers. Determine if the first number is greater than, less than, or equal to the second number.

Example Output 1 Enter 1st num: 2.5 Enter 2nd num: 2.4 The 1st number is greater than 2nd number.