setw ( ) is used for fill the blank right is used for right justification of data
int digits = result . back ( ) . str ( ) . size ( ) ; for ( int i = 0 ; i < result . size ( ) ; i ++ ) { cout << setw ( digits + 1 ) << right << result [ i ] << endl ; } }