Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int sales[5] = {};
- int counter = 1;
- for(int i = 0; i < 5; i++) {
- cout << "Enter today's sale for store " << counter << ": $";
- cin >> sales[i];
- counter++;
- }
- cout << "\nSALES BAR CHART\n(Each * = $100)\n";
- counter = 1;
- for(int j = 0; j < 5; j++) {
- int strix = sales[j]/100;
- cout << "store " << counter << ": " ;
- for(int k = 0; k < strix; k++) {
- cout << "*";
- }
- cout << "\n";
- counter++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement