Question: Snow Fall Program: A Write a program that can be used by a ski resort to keep track if local snow conditions for one week.

Snow Fall Program:

A Write a program that can be used by a ski resort to keep track if local snow conditions for one week. It should have two seven-element arrays to store the date and number of inches of snow. First, the program should ask the user to enter the name of the month. Then, it should have the user enter dates(dates does not need to be in sequential order) and corresponding snow fall. Once data is entered, store them in two arrays mentioned above. Then, the program should produce a report for the week with following information. Use arrays to store snowfall and corresponding dates.

I need the output to state the DATE associated with the highest snowfall:

The highest snow fall is 100.67 on [ ] and the average snowfall is 62.91

Could someone take a look at my program? Everything else works except for that part. Thank you.

#include #include using namespace std;

int main() { const int SIZE = 7; int date[SIZE]; int i; float snowFall[SIZE]; float sum = 0; float average; float highestSnowFall = 0;

for(i = 0; i < SIZE; i++ ) { cout << "Enter the date: "; cin >> date[i]; cout << "Enter the snow fall for date " << date[i] <> snowFall[i]; sum += snowFall[i]; if(highestSnowFall < snowFall[i]) { highestSnowFall = snowFall[i]; } } average = sum/SIZE; cout << "\t Snow Report December " << "===================================== "<< "Date\t\t Snow Fall "; for(i=0; i < 7; i++) { cout << date[i] <<"\t\t\t" << snowFall[i] <<" "; } cout <date[i]<< " and the average snowfall is "<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!