Question: Write a program using C++ that will calculate the area of a circle. The user will be prompted to enter the diameter from the keyboard
Write a program using C++ that will calculate the area of a circle. The user will be prompted to enter the diameter from the keyboard in inches. The program will calculate the radius and area of a circle and display the results. The formula is listed below.
// note declare PI as data type double in the declaration section of the program //for example: double PI = 3.14159; then use it appropriately in the two step formula radius = diameter / 2 area = PI * radius * radius Please use good comments (Finish in 2 hours or under if possible please)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
