Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The price of a single pizza is 50 dirhams if you by less than 4 pizzas. For example, if you buy 2 pizzas then you

The price of a single pizza is 50 dirhams if you by less than 4 pizzas. For example, if you buy 2 pizzas then you will pay 100 dirhams. If you buy 4 to 10 pizzas then each pizza will cost 40 dirhams. If you buy more than 10 pizzas then each pizza will cost 30 dirhams. For example, if you buy 3 pizzas then you will pay 150 dirhams but buying 4 pizzas will cost 160 dirhams. If you buy 8 pizzas then you will pay 320 dirhams. Finally, if you buy 15 pizzas then you will pay 450 dirhams.

Write the algorithm to input the number of pizzas to buy and calculate the total cost. Write both the requirement analysis (input / output) and the algorithm in the answer box

note: using c++

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

8. Praise the trainees for their success in learning the task.

Answered: 1 week ago