Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Scanner scanner = new.scanner (System.in());
  2. double b1 = Double.parseDouble(scanner.nextLine());
  3. double b2 = Double.parseDouble(scanner.nextLine());
  4. double h = Double.parseDouble(scanner.nextLine());
  5. double area = (b1 + b2) * h / 2.0;
  6. System.out.println(area);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement