fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. double a, b, alpha, h=0;
  10. Scanner sc = new Scanner(System.in);
  11. a = sc.nextDouble();
  12. b = sc.nextDouble();
  13. alpha = sc.nextDouble();
  14. h = ((a-b) / 2 ) * Math.tan(alpha);
  15. System.out.format("%f", h * ( (a+b) / 2));
  16. }
  17. }
Success #stdin #stdout 0.17s 322368KB
stdin
15	10	0.785398
stdout
31.249989787661146