fill.cpp 404 B

12345678910111213141516171819
  1. // fill.cpp -- changing fill character for fields
  2. #include <iostream>
  3. int main()
  4. {
  5. using std::cout;
  6. cout.fill('*');
  7. const char * staff[2] = { "Waldo Whipsnade", "Wilmarie Wooper"};
  8. long bonus[2] = {900, 1350};
  9. for (int i = 0; i < 2; i++)
  10. {
  11. cout << staff[i] << ": $";
  12. cout.width(7);
  13. cout << bonus[i] << "\n";
  14. }
  15. // std::cin.get();
  16. return 0;
  17. }