Question: Write a java code snippet that prompts a grocer for the price of every vegetable a person purchases. Use a do while loop to allow

Write a java code snippet that prompts a grocer for the price of every vegetable a person purchases. Use a do while loop to allow for the grocer to enter as many veggies as necessary. Use -1 as a sentinel. If the customer spends at least $30, they receive a 15% discount. If the customer qualifies for the discount, output a statement informing them of this as well as their new total with the discount applied. If the customer does not qualify, only output their total. Be sure to format your output. */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!