Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner input = new Scanner(System.in);
- double al, h, s, lt, ls;
- System.out.print("Panjang Alas :");
- al = input.nextDouble();
- System.out.print("Tinggi :");
- h = input.nextDouble();
- System.out.print("Sudut Alas :");
- s = input.nextDouble();
- lt = 0.5 * h * (al + (al - (2 * h * Math.tan(s)))); // LUAS TRAPSESIUM
- ls = 0.5* h * al; // LUAS SEGITIGA
- System.out.println("Luas Trapesium : "+ lt);
- System.out.println("Luas Segitiga : "+ ls);
Advertisement
Add Comment
Please, Sign In to add comment