[Solved] if someone could take a look at this problem and give me some advice

colton Asks: if someone could take a look at this problem and give me some advice

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 am stuck from here. I don’t understand what to do.

#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;
        cout << " salary as a whole number";
        cin >>  salary; 
        cout << endl;

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.