Question: Challenge 3 - Basic Function You need to write a function in your dinner app that will display all of the costs associated with your
Challenge Basic Function
You need to write a function in your dinner app that will display all of the costs associated with your dinner.
Underneath the variables below, write a function called displayCost
Inside the function create the following constants:
perPersonCost Double set equal to costPerHour times Doubledays
groupCost Double set equal to perPersonCost times DoublenumberOfPeople
tax Double set equal to groupCost times
total Double set equal to groupCost plus tax
Print total inside your function and call the function.
Remember you will need to convert your Int variables to Doubles when performing operations
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
