#include <iostream>
using namespace std;
int main() {
// Individual variables for each store instead of an array
int store1 = 0, store2 = 0, store3 = 0, store4 = 0, store5 = 0;
// Single for loop for the sales input
for (int i = 1; i <= 5; i++) {
cout << "Enter today's sales for store " << i << ": ";
if (i == 1) cin >> store1;
else if (i == 2) cin >> store2;
else if (i == 3) cin >> store3;
else if (i == 4) cin >> store4;
else if (i == 5) cin >> store5;
}
// Display the bar chart header
cout << "\nSALES BAR CHART\n";
cout << "(Each * = $100)\n";
// Display the bar graph for each store
for (int i = 1; i <= 5; i++) {
cout << "Store " << i << ": ";
// Retrieve the sales for the current store
int currentSales = 0;
if (i == 1) currentSales = store1;
else if (i == 2) currentSales = store2;
else if (i == 3) currentSales = store3;
else if (i == 4) currentSales = store4;
else if (i == 5) currentSales = store5;
// Calculate and display asterisks
int numAsterisks = currentSales / 100;
for (int j = 0; j < numAsterisks; j++) {
cout << "*";
}
cout << endl;
}
return 0;
}