im making a program where i will displaying the sales of each store using a sales bar chart.
user will input sales for each store.
after the input, a sales chart must be displayed using a for loop, with each '*' = $100 in sales
question: how can i make the * worth $100 so when ie: sales are $400 for the day, 4 * will be displayed? this is the trouble i am having with my for loop!
this is what i have so far.
#include <iostream>
using namespace std;
int main()
{
double sale1, sale2, sale3, sale4, sale5;
double total;
int row;
cout << "Enter today's sale for store 1: ";
cin >> sale1;
cout << "Enter today's sale for store 2: ";
cin >> sale2;
cout << "Enter today's sale for store 3: ";
cin >> sale3;
cout << "Enter today's sale for store 4: ";
cin >> sale4;
cout << "Enter today's sale for store 5: ";
cin >> sale5;
cout << endl;
cout << "SALES BAR CHART" << endl;
for (row = 0; row < 5; row++)
{
cout << '*';
cout << endl;
}
return 0;
}
thanks in advance!!