It is difficult to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year. you cannot simply use this
year's price as the cost of pencils two years from now. Because of inflation the cost is likely to be higher than it is today. Write a program to gauge the expected
cost of an item in a specified number of years. The program ask for the cost of the item , the number of years from now that the item will be purchased, and the
rate of inflation. The program then outputs the estimated cost of the item after the specified period. Have the user inter the inflation rate as a percentage, such
as 5.6 (percent). Your program should then convert the percentage to a decimal fraction, such as as 0.056, and should use a loop to estimate the price adjusted
for inflation, (Hint: Use a loop.)
Make the following changes to the program.
1.Ask the user the name of the item to be used in the calculations.
2. The output should look like this:
The (name of the item) costs (present cost) now.
The (name of the item) will cost (future cost) in (number of years) years.
Run the program with the following information.
The item is a car.
The present cost is $25,000.
The number of years is 10.
The inflation rate is 8%.
Write program in C++
PLEASE REFER BELOW CODE
#include<iostream>
#include<string>
using namespace std;
int main()
{
double expected_cost,inflation_rate,cost;
int years;
string name;
//user input name of item
cout<<"Enter item name : ";
cin>>name;
//user input present cost
cout<<"Enter present cost : $";
cin>>cost;
//user input inflation rate
cout<<"Enter inflation rate : ";
cin>>inflation_rate;
//user input number of years
cout<<"Enter number of years : ";
cin>>years;
//converting inflation rate into
decimal
inflation_rate = inflation_rate / 100;
//initial value of expected cost
expected_cost = cost;
//for each year we have to add (current cost x
inflation rate) to present cost
for(int i = 0; i < years; i++)
{
expected_cost += (cost *
inflation_rate);
}
//display results
cout<<"The "<<name<<" costs
$"<<cost<<" now."<<endl;
cout<<"The "<<name<<" will
cost $"<<expected_cost<<" in "<<years<<"
years."<<endl;
return 0;
}
PLEASE REFER BELOW OUTPUT

It is difficult to make a budget that spans several years, because prices are not stable....
IN JAVAWrite a program that deals with inflation, which is essentially the rising cost of general goods over time. That is, the price of goods, such as a packet of peanuts, goes up as time goes by. So, you will write a program to gauge the expected cost of an item in a specified number of years. The program asks for the cost of the item, the number of years, and the rate of inflation. The output is the estimated...
.Need code for my java class !! Write a simple java program that uses loops. You may use ‘WHILE’ or ‘FOR’ or ‘DO-WHILE’ – you decide. The program should use a loop to compute the semester average for up to 5 students. In the loop the user will ask for a student name and their 3 test scores and add them up and divide the total by 3 giving the semester average. You will print out the student name and...
You are to write a program IN C++ that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: if the an item's wholesale cost is 5.00 and its markup percentage is 100%, then the item's retail price is 10.00 If an item's wholesale cost is 5.00 and its markup percentage is 50%, then the item's retail price is 7.50 Program design specs. You should have 5...
14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account afer a specified namber of years is The terms in the formula are A is...
MATLAB Part 1 – randFloatValue.m This function accepts two numbers, lower and upper, and returns a random number in between. The rand() function will be useful here. Part 2 – getValue.m getValue has three parameters: - prompt: A string that is displayed to the user. This should be passed to your input function. - lower: The lowest number that the user is allowed to input - upper: The highest number that the user is allowed to input This function should...
Note: You must write this program in Python. General Requirements The program should display a menu and allow the user to perform one of the following tasks. Add an item to the list Delete an item from the list Print the list Print the list in reverse Quit the program The program should run until the user chooses to quit. In Python, programmatically quitting the application is achieved with the exit() procedure. You should use a List to store the...
Python please help! Thanks you
Write a code to get an unlimited number of grades from the user (the user can press enter to finish the grades input, or use a sentinel, for example-1), and then calculate the GPA of all the grades and displays the GPA To do this you might need some help. Try to follow the following process (and check your progress by printing different values to make sure they are as they supposed to be): 1-...
Need help with a few programming exercises. The language being used for all of them is JAVA. 1) exercises - branching (language is JAVA) • Write a method whatToWear(int temp) that takes a temperature and then outputs a string for what to wear in different weather conditions. There must be at least 3 categories. For example, whatToWear(90) might return “shorts” and whatToWear(30) might return “down coat” 2) Enum exercise • Define an enum Seasons, and rewrite the whatToWear method to...
Q007 Future Value -Present Value 1 a. Suppose that the inflation rate is 3.8% (which means that the overall level of prices is rising 3.8% a year). How many years will it take for the overall level of prices to double? Solution: We want to find the number of years it will take for $1 worth of goods or services to cost $2. Think of $1 as the present value and $2 as the future with an interest rate of...
please make sure to write down all the coding and the output for it
and to do all three steps
Student Name: 1. Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title. (employee.py) 2. Create a UML diagram for Employee class. (word file) 3. Create a program that stores Employee objects in a dictionary. Use the employee ID number as the key. (employee_App.py) The program should present...