Write a C program that calculates the employee salary and print the information as follows: - Your program should finst ask the user to enter the basic salary and the extra working hours 2. Your program should then read the price of cach extra hour and tax rate from a file called salary_info.tst. 3. Your program should then caleulate the gross salary using the following formula: Gross price (basic salary + number of extra working hours extre working hour cost) -(hasic salary * tax rate): 4 Your program should also ask the user if he is joining any medical insurance, if yes then you ask him how much is the insurance cost and subtract it from the gross salary. And print the gross salary and the details of the salary (number of extra hours and insurance cost) Your program should include at least two functions: I- Function caleulate_salary which takes the basic salary, number of extra working hours, extra hours cost, and the insurance cost and returns the total salary. 2- Function print_salary_info which takes the gross salary, number of extra working hours, and insurance cost as parameters and prints them to the screen.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Write a C program that calculates the employee salary and print the information as
follows:
1- Your program should first ask the user to enter the basic salary and the extra
working hours.
2. Your program should then read the price of each extra hour and tax rate from a
file called salary_info.txt.
3. Your program should then calculate the gross salary using the following formula:
Gross price = (basic salary + number of extra working hours * extra
working hour cost)- (basic salary * tax rate);
4. Your program should also ask the user if he is joining any medical insurance, if
yes then you ask him how much is the insurance cost and subtract it from the
gross salary.
And print the gross salary and the details of the salary (number of extra hours and
insurance cost)
Your program should include at least two functions:
1- Function calculate_salary which takes the basic salary, number of extra
working hours, extra hours cost, and the insurance cost and returns the total
salary.
2- Function print_salary_info which takes the gross salary, number of extra
working bours, and insurance cost as parameters and prints them to the screen.
Transcribed Image Text:Write a C program that calculates the employee salary and print the information as follows: 1- Your program should first ask the user to enter the basic salary and the extra working hours. 2. Your program should then read the price of each extra hour and tax rate from a file called salary_info.txt. 3. Your program should then calculate the gross salary using the following formula: Gross price = (basic salary + number of extra working hours * extra working hour cost)- (basic salary * tax rate); 4. Your program should also ask the user if he is joining any medical insurance, if yes then you ask him how much is the insurance cost and subtract it from the gross salary. And print the gross salary and the details of the salary (number of extra hours and insurance cost) Your program should include at least two functions: 1- Function calculate_salary which takes the basic salary, number of extra working hours, extra hours cost, and the insurance cost and returns the total salary. 2- Function print_salary_info which takes the gross salary, number of extra working bours, and insurance cost as parameters and prints them to the screen.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education