Q1) An accountant works for a company and there is a need for a C program to calculate the average income of fifteen employees after cutting tax from it. Write a program that takes the gross income of the 15 employees using scanf and check the tax range using the given table below. Use repetition structure (while or for loop) to calculate the salary of each entployee and iffelse statements to select the salary based on the gross income. Besides, find the sum of all the salaries and print the average salary for fifteen employees. The formulation for calculating the salary is shown below: Salary = Gross Income Salary = Grosslncome - GrossIncome 0.05 Salary = GrossIncome - Grosslncome 0.10 Salary GrossIncome < 500$ 500$ < GrossIncome < 700$ 700$ < GrossIncome < 1000$ 1000$ < GrossIncome Salary = = GrossIncome - Grosslncome 0.15

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.6: Nested Loops
Problem 3E: (Electrical eng.) a. An electrical manufacturer tests five generators by measuring their output...
icon
Related questions
icon
Concept explainers
Question
Q1) An accountant works for a company and there is a need for a C program to calculate the
average income of fifteen employees after cutting tax from it. Write a program that takes the
gross income of the 15 employees using scanf and check the tax range using the given table
below. Use repetition structure (while or for loop) to calculate the salary of each entployee and
iffelse statements to select the salary based on the gross income. Besides, find the sum of all
the salaries and print the average salary for fifteen employees. The formulation for calculating
the salary is shown below:
Salary = Gross Income
Salary = GrossIncome - GrossIncome 0.05
Salary = GrossIncome - Grosslncome 0.10
GrossIncome < 500$
500$ < GrossIncome < 700$
700$ < GrossIncome < 1000$
1000$ < GrossIncome
Salary =
Salary = GrossIncome - GrossIncome 0.15
C language
Transcribed Image Text:Q1) An accountant works for a company and there is a need for a C program to calculate the average income of fifteen employees after cutting tax from it. Write a program that takes the gross income of the 15 employees using scanf and check the tax range using the given table below. Use repetition structure (while or for loop) to calculate the salary of each entployee and iffelse statements to select the salary based on the gross income. Besides, find the sum of all the salaries and print the average salary for fifteen employees. The formulation for calculating the salary is shown below: Salary = Gross Income Salary = GrossIncome - GrossIncome 0.05 Salary = GrossIncome - Grosslncome 0.10 GrossIncome < 500$ 500$ < GrossIncome < 700$ 700$ < GrossIncome < 1000$ 1000$ < GrossIncome Salary = Salary = GrossIncome - GrossIncome 0.15 C language
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning