Advertisement
MladenKarachanov

Untitled

Nov 8th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. package programmingBasics;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class TrapeziodArea {
  6. public static void main(String[] args) {
  7. Scanner scanner= new Scanner(System.in);
  8. int b =Integer.parseInt(scanner.nextLine());
  9. int b1=Integer.parseInt(scanner.nextLine());
  10. int h =Integer.parseInt(scanner.nextLine());
  11. int area=(b+b1)*h/2;
  12. System.out.printf("%.2d",area));
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement