Printing an integer with internal spacing

#include <iostream.h>
int main()
{
 cout << setiosflags( ios::internal | ios::showpos )
 << setw( 10 ) << 123 << endl;
 return 0;
 }
OUTPUT:

+ 123

No comments:

Post a Comment