Skip to main content

Problem Statement

Take two integers as input and check whether they are equal, greater, or lesser using relational operators.

Solution

#include <stdio.h>

int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    printf("a == b : %d\n", a == b);
    printf("a >  b : %d\n", a >  b);
    printf("a <  b : %d\n", a <  b);
    return 0;
}

Input

5 10

Output

a == b : 0
a >  b : 0
a <  b : 1