Wednesday, 18 June 2014

Write a Program in c++ to find the radius of a circle ,calculate the area and perimeter and display them.



C++ Program to Find Radius,Area and Perimeter of Circle



#include<iostream.h>
#include<stdlib.h>
int main()
{
double radius,area,perimeter;
cout<<"Enter the radius of circle:";
cin>>radius;
perimeter=2*3.14*radius;

area=3.14*radius*radius;
cout<<"The area of circle is:";
cout<<area;
cout<<"\nThe perimeter is:";
cout<<perimeter;
return 0;
}



OUTPUT:


Enter the radius of circle:7.5
The area of circle is:176.71
The perimeter is:47.12

No comments:

Post a Comment