Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. // This section defines variables
  9. bool choice;
  10. const int NUM_FLAVORS = 7;
  11. int sales[NUM_FLAVORS];
  12. string flavors[NUM_FLAVORS] =
  13. { "Plain", "Butter", "Caramel", "Cheese", "Chocolate", "Turtle", "Zebra" };
  14.  
  15.  
  16. // This section allows the user to input the sales data
  17. for (int sale = 0; sale < NUM_FLAVORS; sale++)
  18. {
  19. cout << "Please enter the amount of sales dollars for " << flavors[sale] << " flavor: ";
  20. cin >> sales[sale] >> endl;
  21. }
  22.  
  23. return 0;
  24. }
  25.  
  26. cin >> sales[sale] >> endl;
  27.  
  28. cin >> sales[sale];
  29.  
  30. cin.ignore(std::numeric_limits<std::streamsize>::max(), 'n');
  31.  
  32. #include <limits>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement