Answered step by step
Verified Expert Solution
Question
1 Approved Answer
WR TE THE C CODE You are asked to write a program that manages the salaries and performance scores of employees in a company. Here
WRTE THE C CODE
You are asked to write a program that manages the salaries and performance scores of employees in a company. Here is the translation of the provided text:
You are asked to write a program that manages the salaries and performance scores of employees in a company. In the program, you need to define a constant named CALISANSAYISI with a value of assuming that employees will be examined, and use this constant for the number of employees. The program you write should use the functions defined below with their names and descriptions. You also need to determine the function prototypes according to these descriptions.
In the Main function:
First, arrays maaslar and performanslar should be created to store the salaries and performance scores of the employees, respectively; and variables ort and ort should be created to store the average performance and average salary of the employees, respectively.
The program should ask the user to enter a seed number integer to randomly determine the salaries and performance scores of the employees.
Then, the baslangicMaasBelirle function should be called with appropriate arguments the baslangicMaasBelirle function randomly determines the salaries and performance scores of the employees and calculates the average of the performance scores. The details of the function are given below
After calling the function, the salaries and performance scores of each employee should be printed on the screen using the created arrays, as shown in the sample output. Then, the average performance of the employees should be printed on the screen using the ort variable updated within the function.
Later in the program, the guncelleMaas function should be called for each employee to update their salaries the details of the function are given below
Finally, the program should print the updated salaries of each employee on the screen as shown in the sample output. Then, the value of the ort variable, which holds the average salary of the employees and is updated within the function, should be printed on the screen.
baslangicMaasBelirlearguments; The function takes arguments: arrays to hold the salaries and performance scores of the employees, a seed number, and the average performance. According to the given seed number, the array elements are randomly generated with values between for the maaslar array and for the performanslar array. The ort variable, which holds the average performance value, is updated within the function. The function does not need to return any value.
guncelleMaasarguments; The function takes arguments: the salary and performance score of an employee to be updated, and the average salary ort to be updated within the function. Each time the function is called, it should update the average salary ort The function does not need to return any value. The salary of an employee is updated according to their performance score as follows:
If the performance score the salary is increased by
If the performance score is between the salary is increased by
If the performance score the salary is increased by
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started