C++ program to find area of circle using function

#include<iostream>
using namespace std;
float area_circle(int radius);
int main()
{
float radius,area;
cout<<"Enter the radius of the circle to find the area\n";
cin>>radius;
area=area_circle(radius);
cout<<"Area of the circle is \n"<<area;
}
float area_circle (int radius)

{
float area;
area=3.14*radius*radius;
return area;
}
OUTPUT:
Enter the radius of the circle to find the area
2
Area of the circle is 
12.56

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation