Write a C program to check whether the given number is equal or not equal using if, if else
#include <stdio.h>
int main()
{
int number1;
int number2;
printf("Enter the number 1: ");
scanf("%d", &number1);
printf("Enter the number 2: ");
scanf("%d", &number2);
if(number1==number2)
{
printf("The numbers is equal.");
}
else
{
printf("The numbers is NOT equal.");
}
getchar();
getchar();
return 0;
}
Comments
Leave a comment