Question: Integers numHamburgers and dollars are read from input. A hamburger costs 7 dollars If numHamburgers is greater than or equal to 2 , then declare
Integers numHamburgers and dollars are read from input. A hamburger costs dollars If numHamburgers is greater than or equal to then declare and initialize int variable totalCost with the product ofnumHamburgers and If totalCost is less than or equal to dollars, output "Approved transaction." Otherwise, output "Not enough money to buy all" If numHamburgers is greater than output "Restocking soon."End with a newline. Java
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
