Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone solve it with detail please Quiz 2 for Fundamental of programming for the Second Semester 1443H Question 1: (7 Morks - 45 Minutes)

Can someone solve it with detail please image text in transcribed
Quiz 2 for Fundamental of programming for the Second Semester 1443H Question 1: (7 Morks - 45 Minutes) Write a Ct+ program to keep records of employees as follows: - Create a structure called Employee that contains the information of an employee (name, salary, and years of service). (imark) - Create the function: void add_employee(Employee \&emp), which receives a reference of struct employee as a parameter, this function allows the user to enter the employee information. ( 2 marks) - Create the function: double calc_raise(double "salary, int "years), which calculates the salary after 10% raise only when the years of service is over 10 years. (1mark) Hint: Salary after raise = old salary + (old salary 10010) - Create the function: void print_info(Employee employees[l]. which prints the information of the employees whose salary is greater than 5000 . (2 marks) In main function, create an array of the structure Employee and store in it 2 elements by calling add_employee function, then call the rest of the functions. (1 mark) Somple Run

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

More Books

Students also viewed these Databases questions