Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program to calculate salary raise for employees. If salary is between $ 0 If salary is between $ 30000 If salary is

Write a C program to calculate salary raise for employees.

If salary is between

$ 0

If salary is between

$ 30000

If salary is greater than

$ 40000 the rate is 4.0%

Part a.

Let the user enter salary. Allow the user to enter as many salaries as the user wishes until

the user enters a negative salary to quit. User can also decides to quite immediately after

starting the program. Pick the proper loop.

Calculate the raise, new salary, total salary, total raise, and total new salary.

Sample input and output (leftmost column is user input):

image text in transcribed

Part b.

Using the same given information as before, you will modify the program so that the user specifies how many salaries they want to enter and the program will output that many salaries.

Output shown should look like the following.

image text in transcribed

NOTE: YOU MAY NOT USE ARRAYS, STRUCTURES, OR FUNCTIONS. ONLY LOOPS.

3. Sample input and output (leftmost column is user input) SalaryRate Raise New Salary Salary 25000 Salary: 30000 Salary: 35000 Salary 40000 Salary: -1 Total Process returned 0 (0x0) execution time : 55.237 s 25000.00 7.00 1750.00 26750.00 30000.00 5.50 1650.00 31650.00 35000.00 5.50 1925.00 36925.00 40000.00 5.50 2200.00 42200.00 42200.00 7525.00 137525.00 Press any key to continue

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