Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- // All relational operators which used for decision making and loops.
- int main()
- {
- /* A relational operator checks the relationship between two operands.
- If the relation is true, it returns 1;
- if the relation is false, it returns value 0.*/
- int a,b,c;
- printf(" Enter value of a b c: \n");
- scanf("%d %d %d",&a,&b,&c);
- printf("%d == %d is %d \n", a, b, a == b);//Equal to
- printf("%d == %d is %d \n", a, c, a == c);
- printf("%d > %d is %d \n", a, b, a > b);//greater than
- printf("%d > %d is %d \n", a, c, a > c);
- printf("%d < %d is %d \n", a, b, a < b);//less than
- printf("%d < %d is %d \n", a, c, a < c);
- printf("%d != %d is %d \n", a, b, a != b);//not equal to
- printf("%d != %d is %d \n", a, c, a != c);
- printf("%d >= %d is %d \n", a, b, a >= b);//greater than or equal
- printf("%d >= %d is %d \n", a, c, a >= c);
- printf("%d <= %d is %d \n", a, b, a <= b);//less than or equal
- printf("%d <= %d is %d \n", a, c, a <= c);
- return 0;
- }
Add Comment
Please, Sign In to add comment