C++ Programming Code Examples C++ > Computer Graphics Code Examples Circumference Of Circle Circumference Of Circle When a circle's diameter is 1, its circumference is ?. When a circle's radius is 1-called a unit circle-its circumference is 2?. Formula The circumference of a circle is written ? = C / d Or, equivalently, as the ratio of the circumference to twice the radius. The above formula can be rearranged to solve for the circumference: C = ? * d = 2? * r here, r = Radius ? = ~3.14 #include <iostream> #include<conio.h> #include<stdlib.h> using namespace std; float PI = 3.14; int main() { // Declare Variables float radius, ci; cout << "Simple C++ Program : Circumference Of Circle\n"; cout << "\nEnter the radius of Circle : "; cin>>radius; ci = 2 * PI * radius; cout << "\nCircumference of Circle : " << ci; getch(); return (0); }