#include <iostream>
int main()
{
double ri = 10;
double ro = 20;
if(ri > ro)
{
std::cout << "Error: inner radius bigger than outer radius\n";
return 1;
}
const double Pi = 3.1415926;
double area = (Pi * ro * ro) - (Pi * ri * ri);
std::cout << "Result Area is: " << area << "\n";
return 0;
}
Comments
Leave a comment