Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

What is operatiing system?

Answered: 1 week ago