Advertisement
deyanivanov966

FIRST STEPS IN CODING - MORE EXERCISES 01. Trapeziod Area

Apr 6th, 2021
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class T10 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         Double B1 = Double.parseDouble(scanner.nextLine());
  8.         Double B2 = Double.parseDouble(scanner.nextLine());
  9.         Double H1 = Double.parseDouble(scanner.nextLine());
  10.  
  11.         Double Formule = (B1 + B2) * H1 / 2;
  12.  
  13.         System.out.printf( "%.2f",Formule);
  14.     }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement