Advertisement
desislava_topuzakova

TrapezoidArea

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