loreng

INI YA RIN

Oct 22nd, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Scanner input = new Scanner(System.in);
  2. double al, h, s, lt, ls;
  3.  
  4. System.out.print("Panjang Alas :");
  5. al = input.nextDouble();
  6.  
  7. System.out.print("Tinggi :");
  8. h = input.nextDouble();
  9.  
  10. System.out.print("Sudut Alas :");
  11. s = input.nextDouble();
  12.  
  13. lt = 0.5 * h * (al + (al - (2 * h * Math.tan(s)))); // LUAS TRAPSESIUM
  14. ls = 0.5* h * al; // LUAS SEGITIGA
  15.  
  16. System.out.println("Luas Trapesium : "+ lt);
  17. System.out.println("Luas Segitiga : "+ ls);
Advertisement
Add Comment
Please, Sign In to add comment