Question

In: Computer Science

this is c++ basics pleases. Workers at a company have won a 7.6 % pay increase...

this is c++ basics pleases.

Workers at a company have won a 7.6 % pay increase retroactive for 6 months. Write a program that takes an employee's previous annual salary as input, and output the amount of Retroactive pay due the employee, the new annual salary, and the new monthly salary. Use a variable declaration with the modifier const to express the pay increase.  

You do not need to do this last part at this time:

Your program should allow the calculation to be repeated as often as the user wishes.  

I do expect to see correct coding standards:
1) Constant declarations use all capital letters.

2) All constant and variable names should be meaningful and add to the understand-ability of the program

3) We should format the output numbers to look like american currency ( dollars, decimal point and two decimal digits ( the cents). 123.45 or 256.00. Not 332.2

Solutions

Expert Solution

//C++ program

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
   const double INCREASED_PAY_RATE = 7.6;
   const int MONTH=6;
   double currentAnnualSalary;
   double currentMonthlySalary;
  
   cout<<"Enter current Annual salary : ";
   cin>>currentAnnualSalary;
  
   currentMonthlySalary=currentAnnualSalary/12;
  
   for(int month=1;month<=MONTH;month++){
       currentMonthlySalary = currentMonthlySalary*(1+INCREASED_PAY_RATE/(12*100));
       currentAnnualSalary = currentMonthlySalary*12;
      
       cout<<"Month : "<<month<<"\n Monthly salary : $"<<setprecision(2)<<fixed<<currentMonthlySalary;
       cout<<"\n Annual salary : $"<<setprecision(2)<<fixed<<currentAnnualSalary<<"\n\n";
   }
   return 0;
}

//sample output


Related Solutions

Workers at a particular company have won a 7.6% pay increase retroactive for 6 months.
Using Visual Studio C Language.Problem 1Workers at a particular company have won a 7.6% pay increase retroactive for 6 months. Write a program that takes an employee's previous annual salary as input and outputs the amount of retroactive pay due to the employee, the new annual salary and the new monthly salary. Use a variable declaration with the modifierconst to express the pay increase. Your program should allow the calculation to be repeated as often as the user wishes.Retroactive -...
Write a C++ program that calculates pay for either hourly paid workers or salaried workers.
Write a C++ program that calculates pay for either hourly paid workers or salaried workers. Hourly paid workers are paid their hourly pay rate times the number of hours worked. Salaried workers are payed their regular salary plus any bonus they may have earned. The program should declare two structures for the following data:• Hourly Paid◦ HoursWorked◦ HourlyRate• Salaried◦ Salary◦ BonusThe program should also declare a structure with two members. Each member should be a structure variable: one for the...
The company has been making efforts to increase the skills of its workers and they have...
The company has been making efforts to increase the skills of its workers and they have been funding training programs for employees. Five years ago, only 8% of the workforce had C TRAINING LEVEL, the most advanced training level. They will use this sample to determine if there is significant evidence that their efforts have led to an increase in the proportion of employees with C  TRAINING LEVEL. Use significant level alpha=5% to conduct the appropriate hypothesis test and enter your...
1. Suppose workers bargain for a new contract that gives them a 5 percent pay increase...
1. Suppose workers bargain for a new contract that gives them a 5 percent pay increase over the next year. If they expected no inflation and inflation is in fact 2 percent, inflation makes: a. both workers and firms worse off. b. workers worse off and firms better off. c. workers better off and firms worse off. d. both workers and firms better off. 2. Social security payments have been adjusted for inflation annually since the late 1970s yet it...
1. You have just won a Colorado Lottery prize that will pay annual payments $7,573 forever....
1. You have just won a Colorado Lottery prize that will pay annual payments $7,573 forever. You would rather have a lump sum today rather than the future payments. If you wanted o discount those payments by 11.0%, the value of that prize in todays dollars would be $__.__. 2. Suppose that you were to receive $105 at the end of year one, $230 at the end of year 2, and $352 at the end of year three. If the...
MUST BE DONE IN C (NOT C++) This program should utilize the basics of strings. First,...
MUST BE DONE IN C (NOT C++) This program should utilize the basics of strings. First, declare and initialize a string. You can name the variable whichever way you want and you can initialize it to whichever value you want. Then, use a for loop to print its characters; one at a time, until you reach the null character. After this, go ahead and declare a second string (since you are not initializing it right away, you will have to...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000...
Broussard Skateboard's sales are expected to increase by 20% from $7.6 million in 2016 to $9.12...
Broussard Skateboard's sales are expected to increase by 20% from $7.6 million in 2016 to $9.12 million in 2017. Its assets totaled $5 million at the end of 2016. Broussard is already at full capacity, so its assets must grow at the same rate as projected sales. At the end of 2016, current liabilities were $1.4 million, consisting of $450,000 of accounts payable, $500,000 of notes payable, and $450,000 of accruals. The after-tax profit margin is forecasted to be 6%,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT