Answers for "perimeter of parallelogram in java"

1

perimeter of parallelogram in java

import java.util.Scanner;
public class PerimeterOfParallelogram
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);
      System.out.println("Please enter length of adjacent side of parallelogram: ");
      double a = sc.nextDouble();
      System.out.println("Please enter another length of adjacent side of parallelogram: ");
      double b = sc.nextDouble();
      double perimeter = 2 * (a + b);
      System.out.println("perimeter of parallelogram is: " + perimeter);
      sc.close();
   }
}
Posted by: Guest on October-30-2020

Code answers related to "perimeter of parallelogram in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language