Compare two integers without using any Comparison operator | C ++ program to compare two integers without any comparison operator . ; function return true if A ^ B > 0 else false ; Driver program
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool EqualNumber ( int A , int B ) { return ( A ^ B ) ; } int main ( ) { int A = 5 , B = 6 ; cout << ! EqualNumber ( A , B ) << endl ; return 0 ; }