area of parallelogram in java

Solutions on MaxInterview for area of parallelogram in java by the best coders in the world

showing results for - "area of parallelogram in java"
Marouane
15 Jan 2018
1import java.util.Scanner;
2public class AreaOfParallelogram
3{
4   public static void main(String[] args)
5   {
6      Scanner sc = new Scanner(System.in);
7      System.out.println("Please enter base of parallelogram: ");
8      double base = sc.nextDouble();
9      System.out.println("Please enter height of parallelogram: ");
10      double height = sc.nextDouble();
11      double area = base * height;
12      System.out.println("Area of parallelogram is: " + area);
13      sc.close();
14   }
15}