VOOZH about

URL: https://www.geeksforgeeks.org/dsa/program-find-circumference-circle/

⇱ Program to find Circumference of a Circle - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Program to find Circumference of a Circle

Last Updated : 16 Feb, 2023

Given radius of a circle, write a program to find its circumference.
Examples : 
 

Input : 2
Output : Circumference = 12.566

Input : 8
Output : Circumference = 50.264


 


In a circle, points lie in the boundary of a circle are at same distance from its center. This distance is called radius. Circumference of a circle can simply be evaluated using following formula. 
 

Circumference = 2*pi*r
where r is the radius of circle 
and value of pi = 3.1415.


 

👁 Image


 

Output : 

Circumference = 31.415

Time Complexity: O(1), since there is no loop or recursion.

Auxiliary Space: O(1), since no extra space has been taken.


This article is contributed by Saloni Gupta .
 

Comment