Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C-language programming QUESTION 7 Create a simple payroll program, which will read data for each employee, perform some arithmetic calculations and write results in a

C-language programming

image text in transcribed

image text in transcribedimage text in transcribed

QUESTION 7 Create a simple payroll program, which will read data for each employee, perform some arithmetic calculations and write results in a tabular form (table output). The forms of the input and output are described below. Your program must read its input: Employee Name String (50 char maximum) Employee ID number integer between 1000 and 9999 Employee's age integer between 18 and 99 Employee's grosssalary real number between 0.0 and 9999,99 Table 1 The payroll program may check and validate that all input values will be logically correct (ie: no negatives or special characters) and that all values will be in the specified ranges. You will write a program which computes the net monthly salary of each employee from employee gross monthly salary. The deductions made on monthly gross salary are for insurance and taxes. The insurance fee paid by each employee is determined from Table 2. Income tax deduction is based on range given in Table 3. You must also calculate the average gross salary, average insurance fee, average income tax and average net salary forall the employees for whom you are given data (how many employees' data you want to process). Age Monthly Insurance Cost Up to 35 RM110 36 to 65 RM160 over 65 Table 2 RM250 Gross Monthly Income up to RM999.99 RM 1000.00 to RM2999.99 RM3000.00 and above Table 3 Income Tax Rate 0% 2.5% 5% SAMPLE OUTPUT: Number of Employee to process: 2 Employee name: ABU Employee ID: 1234 Employee Age: 65 Employee Salary: 1000 Employee name: ALI Employee ID:3456 Employee Age:20 Employee Salary: 3000 Payroll: Name ABU ALI Average ID Age Insurance 1234 65 RM160.00 3456 20 RM110.00 RM???? GrossSalary RM1000.00 RM3000.00 RM???? Netsalary RM???? RM???? RM

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago