Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- const double PI=acos(-1.0);
- int main() {
- float n;
- cin >> n;
- double r = (PI/2 - atan(.5))*2;
- //cout << r << endl;
- double area = ((n*(n/2.0)) - 2*PI*(n/4.0)*(n/4.0))/8;
- //cout << n/4 << endl;
- double farea = (.5*(n/4.0)*(n/2.0))-(.5*(n/4.0)*(n/4.0)*(r-sin(r)))-area;
- cout << farea << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement