Question: Integer variables numSteaks and dollarAmount are read from input. A steak costs 20 dollars. - If numSteaks is less than 5 , output numSteaks requires

Integer variables numSteaks and dollarAmount are read from input. A steak costs 20 dollars. - If numSteaks is less than 5 , output "numSteaks requires at least 5 to purchase.". - If numSteaks is greater than or equal to 5 , then multiply numSteaks by 20. - If the product of numSteaks and 20 is less than or equal to dollarAmount, output "Successful purchase!". - Otherwise, output "Need more money to purchase all.". - If numSteaks is greater than 22, output "Restocking soon.". Otherwise, output "Item still in stock.". End with a newline. Ex: If the input is 12266 , then the output is: Successful purchase! Item still in stock. 12345678910111213#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
