Advertisement
_takumi

x_equals_y

Aug 6th, 2019
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. // C program to check if two numbers are equal  
  2. // without using arithmetic operators or  
  3. // comparison operators
  4. #include<stdio.h>
  5.  
  6. int main()
  7. {
  8.    int x = 10;
  9.    int y = 10;
  10.    if ( !(x ^ y) )
  11.       printf(" x is equal to y ");
  12.    else
  13.       printf(" x is not equal to y ");
  14.    return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement