i thoguht i had this working and someones done something and its now no longer working, i couldnt workout what was changed.
#include <iostream>
using namespace std;
int main ()
{
Double annSal, mthSal, nAnnSal, nMthSal, pcent, numBkPyMths, bkPy;
pcent = 0.065;
numBkPyMths = 5;
annSal = 0;
nAnnSal = 0;
nMthsal = 0;
cout << "Congratulations! You had a " << pcent * 100 << "% pay rise retroactve for five months.\n";
cout << "I’ll calculate your backpay and new salary.\n";
cout << "What is your current annual salary? "
cin >> annSal;
mthSal = annSal / 12;
bkPy = numBkPyMths * mthSal * pcent;
cout << "\nYour backpay is: " << bkPy << endl;
nAnnSal = annSal * (pcent + 1);
nMthSal = nAnnSal / 12;
cout << "Your new annual salary is: " << nAnnSal << endl;
cout << 'Your new monthly salary is: " << nMthSal << endl;
return 0;
}
das my code
cheers :)