Check If Two Integers are Equal (Using if-else)

The program must accept two integers X and Y as the input. The program must print Equal if X and Y are equal. Else the program must print Not Equal as the output.

Example Input/Output 1:
Input:
15 15

Output:
Equal

Example Input/Output 2:
Input:
44 24

Output:
Not Equal

#include<stdio.h>
int main()
{
    int X, Y;
    scanf("%d %d", &X, &Y);
    if(X == Y){
        printf("Equal");
    }
    else{
        printf("Not Equal");
    }
    return 0;
}
Previous Article

Print Odd or Even (Using if-else)

Next Article

Check if X is Less than Y (Boolean)

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *