12/13/2016

C++ Program To Find Area And Circumference Of Circle

Circumference :-Circumference of circle is the distance around the circle. Calculate The Circumference of Circle By Given Formula

Circumference = 2*π*r 

Here PI (π) is a Greek Letter and r is a Radius (1/2 Of Diameter )

PI (π) = 3.141592653589793 Approx. It Is A Constant Value for more about Circumference Click Here

Area =π *r*r

For more about Area Of Circle Click Here

See Also :-C Program To Find Area And Circumference Of Circle

Solution :-

#include<iostream>
using namespace std;
int main()
{
/*Program By Ghanendra Yadav
Visit http://www.programmingwithbasics.com/
*/
int rad;

float PI = 3.14, area, ci;
cout<<"Enter radius of circle: ";
cin>>rad;
area = PI * rad * rad;
cout<<"Area of circle "<< area<<endl;
ci = 2 * PI * rad;
cout<<"Circumference of circle "<< ci<<endl;
return (0);
}


See Also :-JAVA Program To Find Area And Circumference Of Circle

Output:-





Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me

0 Comments: