home *** CD-ROM | disk | FTP | other *** search
- // \EXAMPLES\EX1113.CPP
-
- #include <iostream.h> // include I/O Stream definitions
- #include <iomanip.h> // include manipulator definitions
-
- void main() {
- int first_val, sec_val;
- cout << "Enter two integer values " << endl;
- cin >> first_val >> sec_val;
- cout.fill('&'); // set the fill character to '&'
- cout.width(30);
- cout << " Here is first_val " // field padded to width 30
- << setfill('-')
- << setw(15) << first_val // field padded to width 15
- << " sec_val " << // field not padded
- sec_val << endl; // field not padded
- }
-