logo CodeStepByStep logo

receipt_results

Language/Type: C printf strings
Related Links:
Author: Allison Obourn (on 2020/09/14)

Write a function called receipt_results that takes a double representing a subtotal as a parameter. For example, the call of receipt_results(70.0) should print the text below, calculating tax as 8% and the tip as 15%.

Subtotal:  $70.00
Tax:       $5.60
Tip:       $10.50
Total:     $86.10
Function: Write a C function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.