Function to implement booth 's algo
void boothAlgorithm ( int br [ ] , int qr [ ] , int mt [ ] , int qrn , int sc ) { int qn = 0 , ac [ 10 ] = { 0 } ; int temp = 0 ; cout << " qn TABSYMBOL q [ n + 1 ] TABSYMBOL TABSYMBOL BR TABSYMBOL TABSYMBOL AC TABSYMBOL QR TABSYMBOL TABSYMBOL sc STRNEWLINE " ; cout << " TABSYMBOL TABSYMBOL TABSYMBOL initial TABSYMBOL TABSYMBOL " ; display ( ac , qr , qrn ) ; cout << " TABSYMBOL TABSYMBOL " << sc << " STRNEWLINE " ; while ( sc != 0 ) { cout << qr [ 0 ] << " TABSYMBOL " << qn ;