I'm in an Intro to Comp Science class and I'm writing a program in C++
Here is the question:
Workers at a particular company have won a 7.6% pay increase retroactive for six months. Write a program that takes an employee's previous annual salary as input, and outputs 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. Your program should allow the calculation to be repeated as often as the user wishes.
Here is my program:
Basically I want to give the person their salary for the year and then have it ask them if they want to enter a new salary. The first part (getting the salary) is compiling and running, but I can't get it to repeat etcCode:#include <iostream> using namespace std; int main( ) { const double PAY_INCREASE = 7.6; double original_salary, new_salary, pay_raise; cout << "Enter original salary:\n"; cin >> original_salary; pay_raise = ((original_salary*PAY_INCREASE)/100)/2; new_salary = original_salary+pay_raise; cout << "Your new yearly salary is " << new_salary << " dollars for this year.\n"; cout << "Would you like to input a new salary? (answer y or n)" if (x == y) { cout << "Enter original salary:\n"; cin >> salary_problem; } else { cout << "Good bye!\n"; } return 0; }
Any help is VERY appreciated!!


