fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. double radius, area, circumference;
  8. const double PI = 3.14159;
  9.  
  10. cout << "Enter the radius of the circle: ";
  11. cin >> radius;
  12.  
  13. area = PI * pow(radius, 2);
  14. circumference = 2 * PI * radius;
  15.  
  16. cout << "Area of the circle: " << area << endl;
  17. cout << "Circumference of the circle: " << circumference << endl;
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
Enter the radius of the circle: Area of the circle: 0
Circumference of the circle: 4.36857e-309