/* Header Files */
#include<iostream.h>
#include<conio.h>
/* Main Function */
void main ()
{
/* Clearing Previous Result */
clrscr();
/* Declaring Variable of Float and Int type */
int r, d;
float a ,c;
def fun pi = 3.14;
/* Assigning the Value of r */
cout <<"Enter the value of r <<"\n";
/* Storing the Value */
cin >> r;
/* Calculating various Parameters */
/* Diameter of Circle */
d = (2*r);
/* Area of Circle */
a = (pi*r*r);
/* Circumference of Circle */
c = (2*pi*r);
/* Displaying the Output Values */
cout << "Diameter of Circle is: " << d;
cout << "Area of Circle is: " << a;
cout << "Circumference of Circle is: " << c;
/* Get the output screen at the Execution */
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
