Suppose, you are running a company where 50 employees work. a. Design a structure name Employee to store their Name, Age, Basic salary, Bonus and any other thing that is needed. b. Take all the data for all the employees from user. c. Write a function name emp_bonus(). For those persons who are older than 50 years, will get a bonus which is 40% of their basic salary. The rest of the people will get 25% bonus of their salary. Print the name and the total salary of every employee. d. Open a text file name Employee_Data. If the file opens successfully, write all the employees name and age on that file. e. Now, create function named search_age() in a way that if you search by an employee name, it can find out the age of that person by reading the file Employee_Data.txt.
" CODE MUST BE IN C
Suppose, you are running a company where 50 employees work.
a. Design a structure name Employee to store their Name, Age, Basic salary, Bonus and any other thing that is needed.
b. Take all the data for all the employees from user.
c. Write a function name emp_bonus(). For those persons who are older than 50 years, will get a bonus which is 40% of their basic salary. The rest of the people will get 25% bonus of their salary. Print the name and the total salary of every employee.
d. Open a text file name Employee_Data. If the file opens successfully, write all the employees name and age on that file.
e. Now, create function named search_age() in a way that if you search by an employee name, it can find out the age of that person by reading the file Employee_Data.txt. (Code must be in c not c++)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images