1import java.util.*;
2public class AreaAndPerimeterOfTrapezium
3{
4 public static void main(String[] args)
5 {
6 float a = 6;
7 float b = 14;
8 float c = 10;
9 float d = 5;
10 float h = 21;
11 float area = (float) (0.5 * (a + b) * h);
12 // a, b, c and d are sides of trapezium
13 float perimeter = a + b + c + d;
14 System.out.println("area of trapezium is: " + area);
15 System.out.println("perimeter of trapezium is: " + perimeter);
16 }
17}