Answer to Question #258437 in C++ for Yoni

Question #258437

Find the area of a circle where the radius is provided by the user.

1
Expert's answer
2021-10-29T00:55:31-0400
//Find the area of a circle where the radius is provided by the user.
#include <iostream>
using namespace std;


#define PI 3.141


int main()
{
    float radius, area;
    cout << "Enter radius of circle\n";
    cin >> radius;
    // Area of Circle = PI x Radius X Radius
    area = PI*radius*radius;
    cout << "Area of circle : " << area;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS