Write a C-program to print relation of two numbers
#include <stdio.h>
int main() {
int x,y,z;
printf("Enter x,y values");
scanf("%d%d",&x,&y);
z=x==y;
printf("\n x==y is : %d",z);
z=x>y;
printf("\n x>y is : %d",z);
z=x>=y;
printf("\n x>=y is : %d",z);
z=x<y;
printf("\n x<y is : %d",z);
z=x<=y;
printf("\n x<=y is : %d",z);
z=x!=y;
printf("\n x!=y is : %d",z);
return 0;
}
Output:
Enter x,y values10 20
x==y is : 0
x>y is : 0
x>=y is : 0
x<y is : 1
x<=y is : 1
x!=y is : 1
More Programs
14 . Write a C-program to print relation of two numbers
15 . Write a C-program to print logical operators program using &&, || ,!
16 . Write a C-program to print bitwise AND operation
17 . Write a C-program to print bitwise OR operation
18 . Write a C-program to print bitwise CAP operation
19 . Write a C-program to print bitwise NEGATION operation
20 . Write a C-program to print bitwise LEFT SHIFT operation
21 . Write a C-program to print bitwise RIGHT SHIFT operation
22 . Write a C-program to print odd or even number using ternary operator
23 . Write a C-program to print max number using ternary operator
24 . Write a C-program to print ODD or Even Number using if else condition