Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a program for an appliance company that has 4 employees. Each employee is

ID: 3635559 • Letter: D

Question

Design a program for an appliance company that has 4 employees. Each employee is identified by a number from one to 4 and the sales for the week. 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

Explanation / Answer

#include using namespace std; int position(int *employeeNumbers, int search) { for (int i=0; i= 2000) return true; else return false; } int main() { int employeeNumbers[4] = {1, 2, 3, 4}; int sales[4] = {2500, 1800, 2000, 1500}; int search, pos; int temp = 1; while (temp == 1) { cout > search; pos = position(employeeNumbers, search); if (pos == -1) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote