Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ PROGRAMS:Suppose you are having a pizza party and need to decide how many pizzas you need to purchase if each person attending is expected

C++ PROGRAMS:Suppose you are having a pizza party and need to decide how many pizzas you need to purchase if each person attending is expected to eat an average of four slices. The program should

Ask the user for the number of people who will be at the party

Ask the user for the diameter of the pizzas in inches to be ordered

Calculate and display the number of pizzas to purchase.

To calculate the number of slices in a pizza, use the following information:

Each slice should have an area of 14.125 inches.

To calculate the number of slices, simply divide the area of the pizza by 14.125.

The area of the pizza is calculated with this formula:

image text in transcribedArea=r2

Be sure to properly format your output. You should display 3 decimal places for floating point numbers.

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

More Books

Students also viewed these Databases questions