Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include "stock.h"
  2. #include <iostream>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. Stock::Stock()
  8. {
  9. //ctor
  10. }
  11.  
  12. ostream& operator<< (ostream& out,Stock a)
  13. {
  14. out << setw(14) << "Item "
  15. << setw(8) << "Cost "
  16. << setw(16) << "Amount\n";
  17. out << "---------------------------------------\n";
  18.  
  19. for (int i = 0 ; i < 10 ; i++)
  20. {
  21. out << setw (11) << a.Item[i];
  22. out << setw (8) << a.price[i] << " LE";
  23. out << setw (11) << a.Amount[i] << endl;
  24. }
  25. out << "----------------------------------------\n";
  26.  
  27. return out;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement