Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago