#include <iostream>
#include <iomanip>
usingnamespace std;
//********************************************************************
void menu() //menu function prototype to show menu
void getJobs() // function to get the input of jobs competed and number of times job has been completed
//********************************************************************
int main()
{
menu(); //call job cost display function
getJobs(); // call function to gether jobs completed data
cout << " The total profit made = " << endl ; //display total profits
}
//******************************************************************************************************************************************
// end of body
//******************************************************************************************************************************************
//******************************************************************************************************************************************
//******************************************************************************************************************************************
********************************************************************************************************************************************
// //MENU FUNCTION
//******************************************************************************************************************************************
//******************************************************************************************************************************************
void menu()
{
cout << "1. Lawn Mow" << setw(5) << "$" << jobs[0] << endl; // show job prices function***********
cout << "2. Bushes Trimmed" << setw(5) << "$" << jobs[1] << endl;
cout << "3. Pressure washing" << setw(5) << "$" << jobs[2] << endl;
cout << "4. Gutter Cleaning" << setw(5) << "$" << jobs[3] << endl;
cout << "5. Mulch " << setw(5) << "$" << jobs[4] << endl;
}
//******************************************************************************************************************************************
//******************************************************************************************************************************************
// Assignments for determining profits gathered from specific jobs
//*****************************************************************************************************************************************
int choice = 0;
int jobs[5] = { 50, 70, 65, 45, 100 };
int lawnMowProfit = jobs[0] *= choice;
int bushTrimProfit = jobs[1] *= choice;
int pressureWashProfit = jobs[2] *= choice;
int gutterCleanProfit = jobs[3] *= choice;
int mulchProfit = jobs[4] *= choice;
//*****************************************************************************************************************************************************
//****************************************************************************************************************************************************
// *** //GETJOBS FUNCTION ***
//*******************************************************************************************************************************************************
void getjobs(); //function gathers job completion data and output eache category to it's certain value
do //do while loop
{
cout << "Select the choice of job you have done, then how many times you have done the type of job." << endl << " To finish type done" << endl;
cin >> choice;
if (choice == 1) //if choice is 1, 2, 3, select how many times you completed the job, and output and store values of money made.
{
cout << " how many lawn mowing jobs have you completed " << endl;
cin >> jobs[0];
cout << lawnmowProfit;
}
elseif (choice == 2)
{
cout << " How many bush trimming jobs have you had" << endl;
cin >> jobs[1];
cout << bushTrimProfit;
}
elseif (choice == 3)
cout << " How many pressure washing jobs have you had"
cin >> jobs[2];
cout << pressureWashProfit;
elseif (choice == 4)
cout << " How many gutter cleaning jobs have you done?" << endl;
cin >> jobs[3];
cout << gutterCleanProfit;
elseif (choice == 5)
cout << " How many mulch jobs have you done" << endl;
cin >> jobs[4];
cout << mulchProfit;
} while (choice != done ); //when user types done, program then displays total profits
//*****************************************************************************************************************************************************
#include <iostream>
#include <iomanip>
usingnamespace std;
// declare function prototypes
void menu();
void getJobs();
//*****************************************
// perhaps define global constants and variables here
//*****************************************
int main()
{
menu();
getJobs();
}
//*****************************************
void menu()
{
// code for menu function here
}
//*****************************************
void getJobs()
{
// code for getjobs function here
}
//*****************************************