#include <iostream>
#include <cmath>
#include <iomanip>
float circarea(float);
int main() {
float radius;
std::cout << "Input circle radius: ";
std::cin >> radius;
std::cout << std::setprecision(10);
std::cout << "Circle area: " << circarea(radius) << std::endl;
}
float circarea(float radius)
{
return M_PI * radius * radius;
}
Comments
Leave a comment