Question: Write a program to find the area of a circle. This program should prompt the user to enter the value for the radius and then
Write a program to find the area of a circle. This program should prompt the user to enter the value for the radius and then calculate the area using a simple function that accepts a double and returns a double. The program should perform basic error checking and output the area formatted to show three places past the decimal point. If the input is incorrect (e.g., a negative value), the program should output an error message to stderr and then ask if the user would like to quit (q) or re-enter (e) the value for the radius. The area of a circle of radius r is r2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
