Example of < and >
#include<stdio.h> int main() { int a=10,b=20,c; c=a<b; printf("a = %d\n",a); printf("b = %d\n",b); printf("%d < %d = %d\n",a,b,c); return 0; }
/* Output */ a = 10 b = 20 10 < 20 = 1
#include<stdio.h> int main() { int a=10,b=20,c; c=a>b; printf("a = %d\n",a); printf("b = %d\n",b); printf("%d > %d = %d\n",a,b,c); return 0; }
/* Output */ a = 10 b = 20 10 > 20 = 0
Example of <= and >=
#include<stdio.h> int main() { int a=10,b=20,c; c=a<=b; printf("a = %d\n",a); printf("b = %d\n",b); printf("%d <= %d = %d\n",a,b,c); return 0; }
/* Output */ a = 10 b = 20 10 <= 20 = 1