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 arean”;
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

Leave a Comment

Your email address will not be published. Required fields are marked *

To Resolve this issue at just 5$ from ServerExpert

https://serverexpert.io/

For Hosting please visit Hostingwebsite.io

You have Successfully Subscribed!

Open chat