Posted By

NerdGnome on 04/09/11


Tagged


Versions (?)

lab1


 / Published in: C++
 

  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. struct Cart
  8. {
  9. string item;
  10. double price;
  11. };
  12.  
  13. const int ARRAY_SIZE = 1000;
  14. Cart cart [ARRAY_SIZE];
  15.  
  16. void showAll(int count);
  17. void
  18. void
  19. void
  20.  
  21. int main()
  22. {
  23. char choice = ' ';
  24. int count = 0;
  25. string itemName;
  26.  
  27. cout << "Welcome to Patrick’s Grocery Calculator.\nPlease enter the item you want to add to cart:" << endl;
  28. getline(cin, itemName);
  29.  
  30. cout.setf(ios::fixed, ios::floatfield);
  31. cout.setf(ios::showpoint);
  32. cout.precision(2);
  33.  
  34.  
  35. return 0;
  36. }

Report this snippet  

You need to login to post a comment.