-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathRelationalOpDemo.c
26 lines (26 loc) · 1.28 KB
/
RelationalOpDemo.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/******************************************************
* File : ArithmaticDemo.c
* Description : C Program to demonstrate Relational Operators
* Author : Sarju S
* Version : 1.0
* Date : 11/05/2021
* ***************************************************/
#include<stdio.h>
int main(){
int number1 =5, number2=5,number3 =10;
/*TRUE is represented as 1 FALSE as 0 */
printf("1: TRUE\t 0:FALSE\n");
printf("%d == %d is %d \n", number1, number2, number1 == number2);
printf("%d == %d is %d \n", number1, number3, number1 == number3);
printf("%d > %d is %d \n", number1, number2, number1> number2);
printf("%d > %d is %d \n", number1, number3, number1 > number3);
printf("%d < %d is %d \n", number1, number2, number1 < number2);
printf("%d < %d is %d \n", number1, number3, number1 < number3);
printf("%d != %d is %d \n", number1, number2, number1 != number2);
printf("%d != %d is %d \n", number1, number3, number1 != number3);
printf("%d >= %d is %d \n", number1, number2, number1 >= number2);
printf("%d >= %d is %d \n", number1, number3, number1 >= number3);
printf("%d <= %d is %d \n", number1, number2, number1 <= number2);
printf("%d <= %d is %d \n", number1, number3, number1 <= number3);
return 0;
}