I need help with making a inflation calculator. So basically the user enter the price of an item,the year of inflation, the percent of inflation. The output is to show the inflation rate of the item up to that year. So if the user enter $10, 5 years at 2.5% inflation rate. The program would show the rate from year 1 through year 5.
I wrote a program already but it only calculated for that year. I need to make it so it show the inflation rate up to that year.
using namespace std;
double cost, inflation,result_price=0;
int number_year, i=2;
cout<<"Enter the cost for the item: ";
cout<<"Enter the number of years: ";
cout<<"Enter the rate of inflation: ";