int main()
{
constint NUM_STORES = 5;
// no need to declare the same variable multiple times
// = { 0 } : sets all the elements to 0
// = { 1 } : note that this only sets the first element to 1
// and the rest are uninitialised
int stores[NUM_STORES] = { 0 };
// to keep track of total sales
int total_sales = 0;
// for every store
for( int i = 0; i < NUM_STORES; i++ ) {
// ask for input
// store input in stores array
// add to total_sales
}
int num_stars = 0;
// calculate how many stars you need to print
// use a for loop as shown above the print required stars
system("pause");
return 0;
}
how about something like this? i only did day one, but you could figure it out from here. i also cut out the end half of your code since i'm just demonstrating the for loop and how you can use it.