-
-
- #include<iostream.h>
-
- #include<conio.h>
-
-
-
- void main ()
-
- {
-
-
-
- clrscr();
-
-
-
- int r, d;
-
- float a ,c;
-
- def fun pi = 3.14;
-
-
-
- cout <<"Enter the value of r <<"\n";
-
-
-
- cin >> r;
-
-
-
-
-
-
- d = (2*r);
-
-
-
-
- a = (pi*r*r);
-
-
-
- c = (2*pi*r);
-
-
-
- cout << "Diameter of Circle is: " << d;
-
- cout << "Area of Circle is: " << a;
-
- cout << "Circumference of Circle is: " << c;
-
-
-
- getch();
-
- }
Output
Enter the value of r
2
Diameter of Circle is: 4
Area of Circle is: 12.56
Circumference of Circle is: 12.56