Question: num _ turkeys and num _ dollars are read from input. A turkey costs 9 dollars. If num _ turkeys is greater than or equal
numturkeys and numdollars are read from input. A turkey costs dollars.
If numturkeys is greater than or equal to then assign totalcost with the product of numturkeys and
If totalcost is less than or equal to numdollars, then output 'Successful purchase!
Otherwise, output 'Not all turkeys purchased.
If numturkeys is greater than then output 'Now out of stock.
Click here for examples
Ex : If the input is:
then the output is:
Successful purchase!
Now out of stock.
Ex : If the input is:
then the output is:
Not all turkeys purchased.
Now out of stock.
Ex : If the input is:
then the output is:
Not all turkeys purchased.
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
