fork(3) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. #define PI 3.14159265
  5.  
  6. int main() {
  7. double a, b, alpha, h=0;
  8. cin >> a >> b >> alpha;
  9. h = ((a-b) / 2 ) * tan(alpha);
  10. cout << h * ( (a+b) / 2);
  11. return 0;
  12. }
Success #stdin #stdout 0s 3416KB
stdin
30 	20 	0.523599
stdout
72.1688