Write a program to guage the rate of inflation for teh past year.The program ask
ID: 3609716 • Letter: W
Question
Write a program to guage the rate of inflation for teh past year.The program asks for the price of an item both one year ago andtoday. It estimates the inflation rate as the difference inprice divided by the year-ago price. The program should allowthe user to repeat this calculation as often as the userwishes. Define a function to compute the rate ofinflation. The rate of inflation rate should be a value oftype double giving the rate as a percentage.Explanation / Answer
please rate - thanks #include double inflationrate(double,double); int main() {double oldprice, newprice,rate; coutoldprice; while(oldprice>0) {coutnewprice; rate=inflationrate(oldprice,newprice)*100; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.