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
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] <
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started