text: Subtract two numbers without using arithmetic operators | CPP Program to subtract two Number without using arithmetic operator Recursive implementation . ; Driver program
code: #include <iostream> NEW_LINE using namespace std ; int subtract ( int x , int y ) { if ( y == 0 ) return x ; return subtract ( x ^ y , ( ~ x & y ) << 1 ) ; } int main ( ) { int x = 29 , y = 13 ; cout << " x ▁ - ▁ y ▁ is ▁ " << subtract ( x , y ) ; return 0 ; }