Well, you're going to have a big problem when trying to make your bar graph. You ended up with 1 store variable number, not 5 values for 5 stores. For that, you needed to declare the
int stores;
as
int stores[5];
That will give a place to store 5 different inputs, starting with
stores[0];
and ending with
stores[4];
. If you need more than 5 stores, make the 5 a larger number, but you must do that at the creation of your program. You cannot make an array afterwards. Well, technically you can, but for a beginner, not so easily. You deal with pointers, etc. Anyway, in your loop, it would be
1 2
|
cin >> sales;
stores[count] = sales;
|
And you should declare your doubles sales after main(), not in the loop. You most likely get an error saying that the sales variable, already exists.
Hope this gets you started.