Carly Fung

Carly Fung

  • NA
  • 2
  • 807

Need helppppp

Oct 1 2022 1:51 AM

The average cost of a college textbook is $125. There is a premium of 20% on hardcover text and a discount of 5% on sales of more than 4 textbooks. Write a program to prompt the user for the appropriate inputs and compute and display the before-tax cost of the textbooks.
Sample calculation:
price of 10 hardcover text = 10 * 125 + premium –discount
price = 1250 + 20% of 1250 – 5% of 1250
price = $1437.50

price of 8 softcover text = 8 * 125 –discount
price = 1000 – 5% of 1000
price = $950

price of 2 softcover text = 2 * 125
price = $250

and

If money is left in a particular bank for more than 5 years, the interest rate given by the bank is 7.5%, else the interest rate is 5.4%. Write a program that prompt the user for the number of years that the money was left in the bank and display the appropriate interest rate depending on the value input. How many runs should you make to very that it works correctly?

Thanks