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

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#includeusingnamespacestd;intmain(){intnumSteaks;intdollarAmount;cin>>numSteaks;cin>>dollarAmount;Yourcodegoeshere*/return0

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!