Advertisement
inhuman_Arif

Part 2 ques 1

Oct 7th, 2021
767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. typedef long long ll;
  5. #define pi acos(-1)
  6. double areaofcircle(double r)
  7. {
  8.     double area;
  9.     area = pi*r*r;
  10.     return area;
  11. }
  12.  
  13. int main()
  14. {
  15.     #ifndef ONLINE_JUDGE
  16.         freopen("input.txt", "r", stdin);
  17.         freopen("output.txt", "w", stdout);
  18.     #endif
  19.  
  20.     double radius;
  21.     cin >> radius;
  22.     printf("Area of circle = %.2lf\n",areaofcircle(radius));
  23.    
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement