Answered step by step
Verified Expert Solution
Link Copied!

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 CALISAN_SAYISI with a value of 10, assuming that 10 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 ort1 and ort2 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 ort1 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 ort2 variable, which holds the average salary of the employees and is updated within the function, should be printed on the screen.
baslangicMaasBelirle(arguments); The function takes 4 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 [3000,8000] for the maaslar[] array and [50,150] for the performanslar[] array. The ort1 variable, which holds the average performance value, is updated within the function. The function does not need to return any value.
guncelleMaas(arguments); The function takes 3 arguments: the salary and performance score of an employee to be updated, and the average salary (ort2) to be updated within the function. Each time the function is called, it should update the average salary (ort2). 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 >85, the salary is increased by 10%.
If the performance score is between [70,85], the salary is increased by 5%.
If the performance score <70, the salary is increased by 2%.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

(c) What are the objectives of financial reporting?

Answered: 1 week ago

Question

explain what is meant by redundancy

Answered: 1 week ago