C++ Help please. Procedure or Details The program should ask the user to enter t
ID: 3744919 • Letter: C
Question
C++ Help please.
Procedure or Details
The program should ask the user to enter the radius of the circle with the appropriate prompt at the run time. When the user enters a value, the program should calculate the circumference and area of the circle and display the radius, circumference, and the area in a tabular form as shown below. All the numerical values must be displayed with 2 digits after the decimal. Use appropriate format manipulators with cout statement. Set width of each numerical value to a suitable value, fixed, and precision of 2
Declare pi as a constant with the value of 3.14159
Declare variables for radius, circumference, and area as floating numbers. Format of the Display output is shown below: Radius Circumference Area 3.20 20.11 32.17
So far what I have is,
#include
#include
using namespace std;
int main()
{
int pi = 3.14159;
float radius, circumference, area;
}
Explanation / Answer
#include #include using namespace std; int main() { double pi = 3.14159; float radius, circumference, area; cout > radius; area = pi * radius * radius; circumference = 2 * pi * radius; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.