Driver program
int main ( ) { stack < int > s ; s . push ( 4 ) ; s . push ( 5 ) ; s . push ( -2 ) ; s . push ( -3 ) ; s . push ( 11 ) ; s . push ( 10 ) ; s . push ( 5 ) ; s . push ( 6 ) ; s . push ( 20 ) ; if ( pairWiseConsecutive ( s ) ) cout << " Yes " << endl ; else cout << " No " << endl ; cout << " Stack ▁ content ▁ ( from ▁ top ) " " ▁ after ▁ function ▁ call STRNEWLINE " ; while ( s . empty ( ) == false ) { cout << s . top ( ) << " ▁ " ; s . pop ( ) ; } return 0 ; }