Answer to Question #326131 in C++ for Afomiya

Question #326131

Write c++ program that receives the radius of a circle and calculate The area

1
Expert's answer
2022-04-08T17:54:31-0400
#include <iostream>
using namespace std;


int main() {
    const double PI=3.141592653589793;
    double r;
    double A;


    cout << "Enter a radius: ";
    cin >> r;
    A = PI*r*r;
    cout << "The area of the circle is " << A << endl;


    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