fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. // Function to calculate the Circle Area Along the Circumference
  7. double CircleAreaAlongtheCircumferenceFunction(int Circumference)
  8. {
  9. double Pi = 3.14;
  10. return (Circumference * Circumference) / (4 * Pi);
  11. }
  12.  
  13. int main()
  14. {
  15. int Circumference = 20; // Declare and initialize Circumference in main
  16. double Area;
  17.  
  18. Area = CircleAreaAlongtheCircumferenceFunction(Circumference);
  19.  
  20. cout << "The Circle Area Along the circumference is : " << Area << endl;
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
The Circle Area Along the circumference is : 31.8471