To check wheather 2 numbers are equal or not without using Relational Operators
// to check wheather 2 numbers are equal or not
#include<stdio.h>
int main()
{ int x, y;
printf("Enter value of x and y :\n ");
scanf("%d\n %d", &x, &y);
if (x^y)
{
printf("x and y are not equal\n ");
}
else
{
printf("x and y are equal\n ");
}
return 0;
}
Comments
Post a Comment