EBK ABSOLUTE C++
EBK ABSOLUTE C++
6th Edition
ISBN: 9780133970944
Author: SAVITCH
Publisher: PEARSON CUSTOM PUB.(CONSIGNMENT)
bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 2PP

Write a program to gauge the rate of inflation for the past year. The program asks for the price of an item (such as a hot dog or a one-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 program should allow the user to repeat this calculation as often as the user wishes. Define a function to compute the rate of inflation. The inflation rate should be a value of type double giving the rate as a percentage, for example 5.3 for 5.3 % .

Blurred answer
Students have asked these similar questions
Write a program to gauge the rate of an employee’s raise from the previous year. The program asks for their annual salary in this year and the previous year. It estimates the hike percentage as the difference in their salary from the previous year divided by the previous year’s salary. Your program should allow the user to repeat this calculation as often as the user wishes. Define a function to compute the hike percentage for an employee. The hike rate should be a value of type double giving the rate as a percentage, for example 5.3 for 5.3%.
Write a program that asks the user to input a grade that he or she received on an exam. The grade is an integer between 0 and 100 inclusive. The program should convert the numeric grade into the equivalent letter grade. Do the conversion by using a function Letter_Grade () that converts a numeric grade in the range 0 to 100 to the equivalent letter grade. The function should have one argument, the integer grade. The return value of the function should be A if the grade is 90 to 100; B if the grade is 80 to 89; C if the grade is 70 to 79; D if the grade is 65 to 69; and F if the grade is 64 or lower. After converting the grade, the program should display the nu¬meric grade and the equivalent letter grade.
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies. Ex: If the input is: 0 or less, the output is: no change Ex: If the input is: 45 the output is: 1 quarter 2 dimes Your program must define and call the following function:void ExactChange(double userTotal, int& numDollars, int& numQuarters, int& numDimes, int& numNickels, int& numPennies)
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Computer Programming for Beginners | Functions, Parameters & Arguments | Ep24; Author: Programming With Avelx;https://www.youtube.com/watch?v=VXlh-qJpfw0;License: Standard YouTube License, CC-BY