Problem Write a program to calculatethe diameter, circumference and area of a ci
ID: 3608866 • Letter: P
Question
Problem
Write a program to calculatethe diameter, circumference and area of a circle with a specifiedradius.
Specifications
Include thefollowing named constants:
Pi equals3.14159
The radius of thecircle equals 10.25
The program name(Circle Program)
Yourname
The output windowsize, usually 70 to 80 characters.
In the outputwindow, display the program name centered on the top line and yourname centered on the second line. Use thelength and setwfunctionsto center the names. Your code should work with whatever radius,names, or reasonable window widths are used for these namedconstants.
After a blankline, display the radius, diameter, circumference and area each onits own line with identifying labels, rounded to four decimalplaces (include all 0s). Use thesetw( ) function toalign all the decimal points in the samecolumn.
Use meaningfulidentifiers.
Below is a sampleof the output format with different data. Test yourresults.
CircleProgram
JohnDoe
Radius:8.2500
Diameter:16.5000
Circumference:51.8362
Area:213.8245
Explanation / Answer
//Hope this will help you. #include #include using namespace std; int main(){ double d,c,area,r,pi=3.14159; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.