At the beginning of every year, khalid receives a raise on his previous years salary. He wants a program that calculates and displays the amount of his annual raises for the next 3 years, using percent rates 3% 4% 5% and 6%. the program should end when khalid enters a sentinel value for the salary. this is what I got so far and I stuck from here I don't understand thanks in advance.
enter code here#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double years;
double rates;
double prevyear;
double annualraise;
double salary;
cout << fixed << setprecision(0);
cout << "prev year";
cin >> prevyear;
if (years < 1 || years > 3)
cout << "prevyear" << endl;
else
{
cout << " salary as a whole number";
cin >> salary;
cout << endl;
} }
Aucun commentaire:
Enregistrer un commentaire