Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Write a program that can be used by a ski resort to keep track of the local snow conditions for one week. It should have seven-element array of structures or class objects, where each structure or...

1 answer below »
Write a program that can be used by a ski resort to keep track of the local snow conditions for one week. It should have seven-element array of structures or class objects, where each structure or object 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 the ascending order by base depth and display the results (two functions one for sorting and one for displaying the results). Here is the beginning of a sample report. Snow Report December 12-18 Date Base XXXXXXXXXX42.8
Answered Same Day Mar 26, 2020 BCS230

Solution

Amit answered on Mar 28 2020
143 Votes
Student name:
Student ID number:
Course name:
Date:
Professor name:
Table of content
    Serial numbe
    Task name
    Page numbe
    1.
    Task 1
    3
    2.
    Task 2
    5
    3.
    Task 3
    8
Task 1
The desired modified program with respective output to show its execution is as given below:
#include using    namespace    std;
ool searchList(long [], int, long);
const int SIZE =18;
int    main()
{
long accounts[SIZE]    ={5658845,    4520125, 7895122, 8777541,8451277,1302850,8080152,4562555,5552012,5050552,7825877,1250255,1005231,6545231,3852085,7576651,7881200,4581002};
long acctNum;
cout
    "Please    enter a    7-digit    account    number:    ";
bool found=false;
cin
acctNum;
found= searchList(accounts, SIZE , acctNum);
if(found)
cout
"The number is valid\n";
else
cout
"The number is not valid\n";
return    0;
}
ool searchList(long list[],int    numElems,long value)
{
bool found =false;
for(int loopCounter=0;loopCounte
numElems;loopCounter++)
if(value==list[loopCounter])
found=true;
return    found;
}
Execution screen shot:
Task 2
The desired modified...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here