Suppose that a company has decided to offer an annual raise based on the number of years a worker has been with the company. Let the raise be 2% if the time with the company is less than 2 years, 3% if it is between 2 and less than 4 years, and 4% if it is 4 years or more. Consider a particular worker with the current wage of $16.52 per hour who has been with the company for 2 years. Set up code using if function that would determine the raise and print out the current and new wage rate. The printed result should “Current wage = $16.52 and the new wage = $16.85”

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 6E
icon
Related questions
Question
Suppose that a company has decided to offer an annual raise based on the number of years a worker has been with the company. Let the raise be 2% if the time with the company is less than 2 years, 3% if it is between 2 and less than 4 years, and 4% if it is 4 years or more. Consider a particular worker with the current wage of $16.52 per hour who has been with the company for 2 years. Set up code using if function that would determine the raise and print out the current and new wage rate. The printed result should “Current wage = $16.52 and the new wage = $16.85”
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
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