Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <string>
- using namespace std;
- int main()
- {
- // This section defines variables
- bool choice;
- const int NUM_FLAVORS = 7;
- int sales[NUM_FLAVORS];
- string flavors[NUM_FLAVORS] =
- { "Plain", "Butter", "Caramel", "Cheese", "Chocolate", "Turtle", "Zebra" };
- // This section allows the user to input the sales data
- for (int sale = 0; sale < NUM_FLAVORS; sale++)
- {
- cout << "Please enter the amount of sales dollars for " << flavors[sale] << " flavor: ";
- cin >> sales[sale] >> endl;
- }
- return 0;
- }
- cin >> sales[sale] >> endl;
- cin >> sales[sale];
- cin.ignore(std::numeric_limits<std::streamsize>::max(), 'n');
- #include <limits>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement