Question: num _ soups and total _ cash are read from input. A soup costs 8 dollars. If num _ soups is less than 5 ,

num_soups and total_cash are read from input. A soup costs 8 dollars.
If num_soups is less than 5, then output 'Not enough soups.'
If num_soups is greater than or equal to 5, then assign total_cost with the product of num_soups and 8.
If total_cost is less than or equal to total_cash, then output 'Soups successfully purchased.'
Otherwise, output 'Need more money to purchase all.'
If total_cash is greater than or equal to 8, then output 'At least one item was purchased.'
If num_soups is greater than 24, then output 'Now out of stock.'

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!