Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need question 5 which is based on question 4 which i solved this way. 4. Write a program to gauge the rate of inflation

image text in transcribedi need question 5 which is based on question 4 which i solved this way.
image text in transcribed
4. Write a program to gauge the rate of inflation for the past year. The pro: gram arla for the price of an item (ricti as a hot dog or a l carat diamond) both one year ago and today. It estimates the inflation rate as the difference in price divided by the year ago price. Your propars should allone the user to repeat this calculation as often as the user wishes. Define a function to compure the rate of inflation. The inflation fate should be a value of type double giving the faie at a percent, for example 53 for 5.3 percent. CHitilar Procedural Abgtraction and functions That leeturn a Valat 5. Enhance your program froen the previous Practice Program by having it also print out the estimated price of the ftem in one and in two years from the time of the calculation. The increase in cost over one yeat is etimated as the intlation rate times the pice at the start of the jcar. Define a second function to determine the estimated cos of an item in one year. given the current price of the item and the inflation rate as argaments

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions