fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float radius, area;
  6. const float PI = 3.14;
  7.  
  8. cout << "Enter the radius of the circle: ";
  9. cin >> radius;
  10.  
  11. area = PI * radius * radius;
  12.  
  13. cout << "Area of the circle = " << area;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 5308KB
stdin
 7
stdout
Enter the radius of the circle: Area of the circle = 153.86