Advertisement
NinaIvanova

trapec

Oct 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public static void main(String[] args) {
  2.         Scanner scan = new Scanner(System.in);
  3.         double a = scan.nextDouble();
  4.         System.out.println("a:"+a);
  5.         double b = scan.nextDouble();
  6.         System.out.println("b:"+b);
  7.         double h = scan.nextDouble();
  8.         System.out.println("h:"+h);
  9.         double S = (a+b)/2 * h;
  10.         System.out.println("S="+S);
  11.  
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement