
Okay! I really need your help or some tips
I need a program that I will recieve a raise on my previous years salary. I need to calculate and display the amount of annual raises for the next three years. I want to use the rates o 3% 4% 5% and 6%.
This is what I have so far but its not working
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int beginSalary = 0;
double newSalary = 0.0;
double raise = 0.0;
double theRate = 0.0;
cout << "Beginning Salary (negative number or 0 to end): ";
cin >> beginSalary;
do
{
// 3 percent
newSalary = (beginSalary+(beginSalary*3/100));
raise = newSalary-beginSalary;
cout << raise << endl;
cout << endl;
// 4 percent
newSalary = (beginSalary+(beginSalary*4/100));
raise = newSalary-beginSalary;
cout << raise << endl;
// 5 percent
newSalary = (beginSalary+(beginSalary*5/100));
raise = newSalary-beginSalary;
cout << raise << endl;
cout << endl;
// 6 percent
newSalary = (beginSalary+(beginSalary*6/100));
raise = newSalary-beginSalary;
cout << raise << endl;
cout << endl;
} while ( newSalary != 0);
return 0;
} //end of main function
What you want to do is this: