c program to demonstrate relational operators
Answers
Answer:
Relational operators are used to find the relation between two variables. i.e. to compare the values of two variables in a C program.
...
Relational operators in C:
Operators Example/Description
>= x >= y (x is greater than or equal to y)
<= x <= y (x is less than or equal to y)
== x == y (x is equal to y)
!= x != y (x is not equal to y)
BY TEJAS KULKARNI PLEASE FOLLOW AND MARK AS BRAINLIST
Answer:
// C program
#include<stdio.h>
int main()
{
int val;
scanf("%d",&val);
if(val==15)
printf("equal operator");
else if(val<15)
printf("less than operator");
else if(val>15)
printf("greater than operator");
else if(val>=15)
printf("greater than or equal to operator");
else if(val<=15)
printf("less than or equal to operator");
else if(val!=15)
printf("not equal to eprator");
else
printf("invalid input");
return 1;
}