Need Help ?

Home >> Assignments >> Other >> 1. Keith's Sheet Music needs a program to implement its music teacher's discount policy. The progra

(Solved): 1. Keith's Sheet Music needs a program to implement its music teacher's discount policy. The progra ...



1. Keith's Sheet Music needs a program to implement its music teacher's discount policy. The program is to prompt the user to enter the purchase total and to indicate whether the purchaser is a teacher. The store plans to give each customer a printed receipt, so your program is to create a nicely formatted file called receipt.txt. Music teachers receive a 10% discount on their sheet music purchases unless the purchase total is $100 or higher. In that case, the discount is 12%. The discount calculation occurs before addition of the 5% sales tax. Here are two sample output files-one for a teacher and one for a nonteacher. Total purchases $ 122.00 Teacher's discount (12%) 14.64 Discounted total 107.36 Sales tax (5%) 5.37 Total $ 112.73 Total purchases Sales tax (5%) Total $ 24.90 1.25 $ 26.15 Note: to display a % sign, place two % signs in the format string: printf("%d%%", SALES_TAX); 2. The rate of decay of a radioactive isotope is given in terms of its half-life H, the time lapse required for the isotope to decay to one-half of its original mass. The isotope cobalt-60 (Co) has a half-life of 5.272 years. Compute and print in table form the amount of this isotope that remains after each year for 5 years, given the initial presence of an amount in grams. The value of amount should be provided interactively. The amount of 60 ?o remaining can be computed by using the following formula: r = amount x C /H) where amount is the initial amount in grams, C is expressed as e-0.693 (e = 2.71828), y is the number of years elapsed, and H is the half-life of the isotope in years. vorhe manier ter hele momentin arms, Cise


We have an Answer from Expert

View Expert Answer

Get Expert Solution


We have an Answer from Expert

Buy This Answer $4

Place Order

QUICK ORDER

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing
Order Now