![]() |
VOOZH | about |
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.
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 .