SHARE
TWEET

cta

NN505 Jan 25th, 2020 (edited) 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6.     int v;
  7.     double s, r, angle, area;
  8.  
  9.     scanf(" %d %lf", &v, &s);
  10.  
  11.     if(v>=3 && v<=359 && s>=1 && s<=1E9){
  12.         angle = 3.14159265358979323846264338/v;
  13.         r = s/(2*sin(angle));
  14.         area = 3.14159265358979323846264338 * r * r;
  15.         printf("%.9lf", area);
  16.     }
  17.     return 0;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top