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 *

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat