Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

c + + Instructions Write a program to implement and test the algorithm that you designed for Exercise 1 5 of Chapter 1 . The

c++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 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 \pi =3.141593.
In your program, declare a named constant PI to 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: 0.017507
Since your program handles currency, make sure to use a data type that can store decimals.
Task #01: Declare PI as a constant
Test Feedback:
No attempts made
Task #02: Correct output calculated and displayed
Test Feedback:
Status: FAILED!
Check: 1
Test: Test case 1
Reason: Unable to find '['0.037']' in the program's output.
Enter the radius of the pizza: Enter the price of the pizza: $Price of the pizza per square inch: $0.0373019
.
Error : AssertionError - Unable to find 0.037 in the program's output.
Timestamp: 2024-01-1917:34:24.945262

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_2

Step: 3

blur-text-image_3

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 Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

Students explore these related Databases questions