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 Code
using System ; class GFG { static bool EqualNumber ( int A , int B ) { if ( ( A ^ B ) > 0 ) return true ; else return false ; } public static void Main ( ) { int A = 5 , B = 6 ; if ( ! EqualNumber ( A , B ) == false ) Console . WriteLine ( "0" ) ; else Console . WriteLine ( "1" ) ; } }