- Program :
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\n----------------RELATIONAL OPERATORS----------------");
printf("\nEnter two values:");
scanf("%d%d",&a,&b);
printf("\n----------------RELATIONAL OPERATOR(==)----------------");
printf("\n%d == %d is %d", a,b,a==b);
printf("\n----------------RELATIONAL OPERATOR(>)----------------");
printf("\n%d > %d is %d", a,b,a>b);
printf("\n----------------RELATIONAL OPERATOR(<)----------------");
printf("\n%d < %d is %d", a,b,a<b);
printf("\n----------------RELATIONAL OPERATOR(!=)----------------");
printf("\n%d != %d is %d", a,b,a!=b);
printf("\n----------------RELATIONAL OPERATOR(>=)----------------");
printf("\n%d >= %d is %d", a,b,a>=b);
printf("\n----------------RELATIONAL OPERATOR(<=)----------------");
printf("\n%d <= %d is %d", a,b,a<=b);
getch();
}
- Output :
No comments:
Post a Comment