Advertisement
Guest User

DBD

a guest
Mar 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Trapeziod_Area {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double b1 = Double.parseDouble(scanner.nextLine());
  7.         double b2 = Double.parseDouble(scanner.nextLine());
  8.         double h = Double.parseDouble(scanner.nextLine());
  9.         double area = (b1+b2)*h/2;
  10.         System.out.println(area);
  11.  
  12.  
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement