This is the code that I have and for some reason it is not given me that I need.
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
// variables
double salary = 0.0;
int RATE = .03;
// enter salary
cout << "Salary (-1 to stop): ";
cin >> salary;
// display raises with 2 decimal places
cout << fixed << setprecision(2);
//begin loop
while (salary != -1)
{
cout << "Annual Raises for next three years: " << endl;
// while loop to calculate annual raises
while (RATE < .07)
{
// display annual raise amount
cout << RATE * 100 << "% raise: ";
cout << salary * RATE << endl;
// update salary value and annual raise rate.
salary += (salary * RATE);
RATE += .01;
//enter salary
cout << "Salary (-1 to stop): ";
cin >> salary;
// reset variables
RATE = .03;
} //end of loop
return 0;
} // end of file
}
I need to display the amount of annual raises for the next three years. All it is giving me is where the user can put in a salary and then nothing for the raise. It is not even letting me end the program by entering (-1). Please someone help me??????