Write a program that can be used by a ski resort to keep track of local snow con
ID: 3627452 • Letter: W
Question
Write a program that can be used by a ski resort to keep track of local snow conditions for one week. It should have a seven element array of structures, where each structure holds a date and the number of inches of snow in the base on that date. The program should have the user input the name of the month, the starting and ending date of the seven-day period being measured, and then the seven base snow depths. The program should then sort the data in ascending order by base depth and display the results. Here is a sample report.Snow Report December 12 - 18
Date Base
13 42.3
12 42.5
14 42.8
15 43.1
18 43.1
16 43.4
17 43.8
Explanation / Answer
#include #include using namespace std; struct SnowDate { int date; double inches; }; int main() { string input_month; SnowDate snowWeek[7]; SnowDate temp; int input_firstday, input_lastday; int inc; //incrementer bool swap; //gather input cout > input_month; cout > input_firstday >> input_lastday; inc = input_firstday; for (int x=0;xRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.