Write c++ program that receives the radius of a circle and calculate The area
#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;
}
Comments
Leave a comment