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 π =3.141593.
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: 0.017507
Since your program handles currency, make sure to use a data type that can store decimals.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here