Question: Answer in Java please Integers numSalads and cash are read from input. A salad costs 15 dollars. - If numSalads is greater than or equal

Answer in Java please Answer in Java please Integers numSalads and cash are read from

Integers numSalads and cash are read from input. A salad costs 15 dollars. - If numSalads is greater than or equal to 3 , then declare and initialize int variable totalCost with the product of numSalads and 15. - If totalCost is less than or equal to cash, output "Salads successfully purchased." - Otherwise, output "Need more money to purchase all." - If numSalads is greater than 29 , output "Restocking soon." Otherwise, output "Item still in stock." End with a newline. Ex: If the input is 6110 , then the output is: Salads successfully purchased. Item still in stock

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!