Advertisement
kirya_shkolnik

Давид 2 задача

Mar 24th, 2022
766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1.  
  2. #include<iostream>
  3. #include<cmath>
  4.  
  5. using namespace std;
  6.  
  7. const double pi = 3.14;
  8.  
  9. double sectorArea(double R, double a){
  10.     return (pi*pow(R,2)*a)/360;
  11. }
  12.  
  13. int main()
  14. {
  15.     double R, a, b, c;
  16.     cin >> R >> a >> b >> c;
  17.     cout << sectorArea(R,  a) << endl;
  18.     cout << sectorArea(R,  b) << endl;
  19.     cout << sectorArea(R,  c);
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement