Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- #define pi acos(-1)
- double areaofcircle(double r)
- {
- double area;
- area = pi*r*r;
- return area;
- }
- int main()
- {
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- double radius;
- cin >> radius;
- printf("Area of circle = %.2lf\n",areaofcircle(radius));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement