Big Bite is offering a promotion as follows: If the customer orders $20 or more worth
Question:
Big Bite is offering a promotion as follows:
• If the customer orders $20 or more worth of food, there is a 20% discount • If the customer orders between $10 and $20 worth of food, there is a 15% discount. • If the customer orders up to $10 of food, there is a 10% discount.
Declare two variables of type double called originalPrice and discountedPrice. Ask the user to enter the original price of the item. Then, compute the discounted price according to the rules above and tell the user what the discounted price is.
Sample Program Run What is the original cost of the food? $14.95 The discounted price is: $12.77
java a program that prints out a student's letter grade based on their percentage in the class. Use the following scale.
Percentage Letter grade 90 or above A 80 - 89 B 70 - 79 C 60 - 69 D Below 60 F
2) java a Fortune Cookie program that gives the user as many random fortunes as they want (choosing from at least three fortunes). Structure your code as follows:
• Ask the user if they would like a fortune.
o If they do not, tell them 'goodbye'.
o If they do, give them a random fortune. (HINT: start by generating a random number, where each number corresponds to a different fortune.)
Sample Program Run #1 Would you like a fortune? (Y/N): Y A dubious friend may be an enemy in camouflage.
Sample Program Run #2 Would you like a fortune? (Y/N): N Goodbye!
Auditing A Practical Approach with Data Analytics
ISBN: 978-1119401742
1st edition
Authors: Raymond N. Johnson, Laura Davis Wiley, Robyn Moroney, Fiona Campbell, Jane Hamilton