#include <stdio.h> int main() { int num1, num2; printf("Enter two numbers: "); scanf("%d %d", &num1, &num2); if (num1 - num2 == 0) printf("The two numbers are equal.\n"); else printf("The two numbers are not equal.\n"); return 0; }
Inside the main() function:
- Integer variables `num1` and `num2` are declared to store the input numbers.
- The user is prompted to enter two numbers.
- The program checks if the difference between the two numbers is equal to 0.
- If the difference is 0, it means the numbers are equal; otherwise, they are not.
- The program prints the result accordingly.