Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Design a program for an appliance company that has 4 employees. Each employee is identified by a number from?
Store the data in an array (you may use 2 parallel arrays or a matrix)
Employee Number Weekly Sales
1 2500
2 1800
3 2000
4 1500
An employee is given a $200 bonus if their weekly sales are greater than or equal to $2000.Ask
the user for the employee number.
The program must be able to loop an indeterminate number of times.
Use a boolean function to determine if the employee is eligible for the bonus
This is what I have
using namespace std;
void instruct()
void getData(int &sales,int &employeeNo )
{
while(employeeNo != 0)
{
int i=0;
cout<<"Enter truck number or 0 to exit:";
cin>>employeeNo;
}
bool Check(int max[],int sales,int index)
{
if(sales<=max[index-1])
return true;
else
return false;
}
void main()
{
int maxSales[]={2500,1800,2000,1500};
int index,sales;
int count;
instruct();
getData(sales, index);
if(CheckLimit(maxSales,sales,index))
cout<<"Congratulations, you will receive a $200 bonus ths week"<<endl;
else
cout<<"Sorry, no bonus this week."<<endl;
}
}
1 Answer
- Wertle WooLv 69 years agoFavorite Answer
First off, why the hell do you have void main()? Who taught you this? I want their name and location, so I can find them and burn their face off for spreading such moronic code.