Question & Answer: Workers at a particular company were given a 15.5% salary increase. Moreover, the increase was retroactive for 2 months, that is…..

PROBLEM Workers, at a particular |company, were given a 15 5% salary ncease Morcover, the increase was mr, luh is clfeche tu monthc ogo Write pnagran that tokes the employces old valary as inpt d tron output the amount f retroactive retro acthive for2 ncc due喬the abiye orld his nen/Valary as wel

Workers at a particular company were given a 15.5% salary increase. Moreover, the increase was retroactive for 2 months, that is effective two months ago. Write a C++ program that takes the employee’s old salary as input and then output the amount of retroactive pay (balance) due to the employee and his new salary as well.

Expert Answer

 

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: Workers at a particular company were given a 15.5% salary increase. Moreover, the increase was retroactive for 2 months, that is…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

C++ Program:

#include <iostream>
#include <iomanip>

using namespace std;

//Constant declaration
const double HIKE = 15.5;

//Main function
int main()
{
double oldSalary, newSalary, retroActivePay;

//Reading old salary
cout << “nn Input employee old salary: $”;
cin >> oldSalary;

//Calculating new Salary
newSalary = oldSalary + (oldSalary * (HIKE/100.0));

//Calculating retroactive pay for 2 months
retroActivePay = (newSalary – oldSalary) * 2;

cout << fixed << setprecision(2);

//Printing calculated values
cout << “nn Amount of retroactive pay (balance) due to employee: $” << retroActivePay;
cout << “nn New Salary: $” << newSalary << ” nn”;

return 0;
}

____________________________________________________________________________________________

Sample Output:

Question & Answer: Workers at a particular company were given a 15.5% salary increase. Moreover, the increase was retroactive for 2 months, that is..... 1

Still stressed from student homework?
Get quality assistance from academic writers!