Question: 5 4 5 0 5 0 . 3 9 5 7 9 2 8 . qx 3 zqy 7 Jump to level 1 num _

545050.3957928.qx3zqy7
Jump to level 1
num_donuts and num_dollars are read from input. A donut costs 3 dollars.
If num_donuts is less than 5, then output 'num_donuts requires at least 5 to purchase.'
If num_donuts is greater than or equal to 5, then assign total_cost with the product of num_donuts and 3.
If total_cost is less than or equal to num_dollars, then output 'Approved transaction.'
Otherwise, output 'Not enough money to buy all.'
If num_dollars is greater than or equal to 3, then output 'At least one item was purchased.'
If num_donuts is greater than 40, then output 'Now out of stock.'
Otherwise, output 'Item still in stock.'
 545050.3957928.qx3zqy7 Jump to level 1 num_donuts and num_dollars are read from

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!