c++ program to find the area of the circle

 Code:-

#include<bits/stdc++.h>
using namespace std;
int main()
{
int r;
float area;
cout<<“Enter the radius of the circle”<<endl; // endl for line change
cin>>r;
area=3.14*r*r;
cout<<“Area of the circle is : “<<area;
return 0;
}

Output:-

Enter the radius of the circle
4
Area of the circle is : 50.26




Leave a Reply

Your email address will not be published.