Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ Area and Circumference of a Circle

    float rad,circum,area;
    const float PI = 3.14159265;

    cout<<"Input the radius of the Circle: ";
    cin>>rad;

    circum = 2*PI*rad;
    area = PI*rad*rad;

    cout<<"The Diameter is "<<area<<" and the circumference is "<<circum;
 
PREVIOUS NEXT
Tagged: #Area #Circumference #Circle
ADD COMMENT
Topic
Name
3+8 =