vstoyanov

Оператори и Изрази 6

May 12th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import org.omg.Messaging.SYNC_WITH_TRANSPORT;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner scanner=new Scanner (System.in);
  9.  
  10.  
  11.            Double a=Double.parseDouble(scanner.nextLine());
  12.            Double b=Double.parseDouble(scanner.nextLine());
  13.         Double h=Double.parseDouble(scanner.nextLine());
  14.  
  15.  
  16.            double square=(a+b)/2*h;
  17.  
  18.         System.out.println(square);
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment