Advertisement
marinjordanov

Untitled

Sep 12th, 2021
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class First {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int b1 =Integer.parseInt(scanner.nextLine());
  8. int b2 = Integer.parseInt(scanner.nextLine());
  9. int h = Integer.parseInt(scanner.nextLine());
  10. double area=(((b1+b2)*h)*1.00)/2;
  11. System.out.printf("%.2f",area);
  12. }
  13. }
  14.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement