Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started