In C++ Program you can easily write a code to read the radius of a circle to calculate the area of the circle and the perimeter of the circle.
#include <iostream.h>
#include <stdlib.h>
Let's have a look at the C ++ Program to read radius of a circle to calculate area and perimeter to display them
#include <iostream.h>
#include <stdlib.h>
int main ()
{ system ("cls")
double radius, area, perimeter ;
cout<<"Enter Radius of the circle : ";
cin>>radius ;
perimeter = 2 * 3.14159 * radius ;
area = 3.14159 * radius * radius ;
cout <<"The area of the circle is" ;
cout<< area ;
cout<<"\n The perimeter of the circle is : " ;
cout<< perimeter ;
return 0 ;
}
double radius, area, perimeter ;
cout<<"Enter Radius of the circle : ";
cin>>radius ;
perimeter = 2 * 3.14159 * radius ;
area = 3.14159 * radius * radius ;
cout <<"The area of the circle is" ;
cout<< area ;
cout<<"\n The perimeter of the circle is : " ;
cout<< perimeter ;
return 0 ;
}