C++ Programming Code Examples C++ > Computer Graphics Code Examples Calculate Area and Circumference of Circle Calculate Area and Circumference of Circle To calculate area and circumference of any circle in C++ Programming, you have to ask to the user to enter the radius of circle, place the radius in a variable say r and make two variable, one for area and other for circumference, and place 3.14*r*r in area and 2*3.14*r in circumference, then display the result on the screen as shown here in the following program. Following program ask to the user to enter the radius of a circle, to calculate and display the area and perimeter of the circle: #include<iostream.h> #include<conio.h> void main() { clrscr(); float r, area, circum; cout<<"Enter the radius of the circle :"; cin>>r; area=3.14*r*r; circum=2*3.14*r; cout<<"Area of the circle = "<<area<<"\nCircumference of the circle = "<<circum<<"\n"; getch(); }