Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Instructions Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter 1 . The instructions to Exercise 15 have been posted below for your convenience: Exercise...

1 answer below »

Instructions

Write a program to implement and test the algorithm that you designed forExercise 15ofChapter 1. The instructions toExercise 15have been posted below for your convenience:

Exercise 15

Given the radius, in inches, and price of a pizza, design an algorithm to find the price of the pizza per square inch.

You may assume that the value of π = XXXXXXXXXX.

In your program, declare a named constantPIto store this value.

Below is an example of how the completed program should work:

Enter the radius of the pizza: 20

Enter the price of the pizza: 22

The price per square inch is: XXXXXXXXXX

Since your program handles currency, make sure to use a data type that can store decimals.

Answered Same Day Sep 19, 2021

Solution

Arun Shankar answered on Sep 19 2021
146 Votes
#include using namespace std;
int main()
{
const double PI = 3.1415;
double radius, area, price;
cout
"Enter the radius of the pizza: ";
cin
radius;

area = PI * radius * radius;

cout
"Enter the price of the pizza: ";
cin
price;
cout
"The...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here