Area of Circle in C++ - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Friday, June 12, 2020

Area of Circle in C++



C++ PROGRAM TO FIND THE AREA OF CIRCLE

Sample Test Case    :    Enter radius of circle  : 5

Sample Test Case    :    Area of circle : 78.5


CODE

#include <iostream.h>
using namespace std;
int main()
{
    float r,area;
    cout<<"Enter Radius of circle :";
    cin>>r;
    area=3.14*r*r;
    cout<<"Area of circle :"<<area;
    return 0;
}

No comments:

Post a Comment