Advertisement
marinjordanov

Untitled

Sep 12th, 2021
40
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 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
Add Comment
Please, Sign In to add comment
Advertisement