home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_11_07 / 1107106b < prev    next >
Text File  |  1993-04-29  |  283b  |  17 lines

  1. // width.cpp:   Control width of input strings
  2. #include <iostream.h>
  3. #include <iomanip.h>
  4.  
  5. main()
  6. {
  7.     char s1[10], s2[3], s3[20];
  8.  
  9.     cin >> setw(10) >> s1
  10.         >> setw(3) >> s2
  11.         >> s3;
  12.  
  13.     cout << s1 << ',' << s2 << ',' << s3 << endl;
  14.     return 0;
  15. }
  16.  
  17.