University of Illinois C++ Program Code
Question C++: please, provide .cpp file for lab4.Lab 4:This program will use a structure to hold the data for each division of a corporation.
The structure will keep the following data:
Name of division (string)Sales total for quarter 1 (double)Sales total for quarter 2 (double)Sales total for quarter 3 (double)Sales total for quarter 4 (double)The program will ask the user for the inputs needed to populate the structure. Then display the data for each instance of the structure.
Complete the code provided to complete the program.
Source Lab 4 File:#include#include#includeusing namespace std;
struct Division{
}
;
void GetDivisionSales(Division& div);void DisplayDivision(Division div);
int main(){Division east, west, north, south;
east.name = “East”;west.name = “West”;north.name = “North”;south.name = “South”;
GetDivisionSales(east);GetDivisionSales(west);GetDivisionSales(north);GetDivisionSales(south);
DisplayDivision(east);DisplayDivision(west);DisplayDivision(north);DisplayDivision(south);
return 0;}
void GetDivisionSales(Division& div){
}
void DisplayDivision(Division div){cout
Question C++: please, provide .cpp file for lab4.
Lab 4:
This program will use a structure to hold the data for each division of a corporation.
The structure will keep the following data:
Name of division (string)
Sales total for quarter 1 (double)
Sales total for quarter 2 (double)
Sales total for quarter 3 (double)
Sales total for quarter 4 (double)
The program will ask the user for the inputs needed to populate the structure. Then display the data for each instance of the structure.
Complete the code provided to complete the program.
Source Lab 4 File:
#include
#include
#include
using namespace std;
struct Division
{
};
void GetDivisionSales(Division& div);
void DisplayDivision(Division div);
int main()
{
Division east, west, north, south;
east.name = “East”;
west.name = “West”;
north.name = “North”;
south.name = “South”;
GetDivisionSales(east);
GetDivisionSales(west);
GetDivisionSales(north);
GetDivisionSales(south);
DisplayDivision(east);
DisplayDivision(west);
DisplayDivision(north);
DisplayDivision(south);
return 0;
}
void GetDivisionSales(Division& div)
{
}
void DisplayDivision(Division div)
{
cout
Top-quality papers guaranteed
100% original papers
We sell only unique pieces of writing completed according to your demands.
Confidential service
We use security encryption to keep your personal data protected.
Money-back guarantee
We can give your money back if something goes wrong with your order.
Enjoy the free features we offer to everyone
-
Title page
Get a free title page formatted according to the specifics of your particular style.
-
Custom formatting
Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.
-
Bibliography page
Don’t pay extra for a list of references that perfectly fits your academic needs.
-
24/7 support assistance
Ask us a question anytime you need to—we don’t charge extra for supporting you!
Calculate how much your essay costs
What we are popular for
- English 101
- History
- Business Studies
- Management
- Literature
- Composition
- Psychology
- Philosophy
- Marketing
- Economics