Answers for "parallelogram area java"

1

area of parallelogram in java

import java.util.Scanner;
public class AreaOfParallelogram
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);
      System.out.println("Please enter base of parallelogram: ");
      double base = sc.nextDouble();
      System.out.println("Please enter height of parallelogram: ");
      double height = sc.nextDouble();
      double area = base * height;
      System.out.println("Area of parallelogram is: " + area);
      sc.close();
   }
}
Posted by: Guest on October-30-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language