Connect with one of the following accounts


Please wait while we redirect...

Views: 8   

In this tutorial i will show you how to calculate parallelogram area.
This program gets parallelogram base and height from user and calculates area and prints it using following formula
Area = base X height

import java.util.Scanner;

public class MathGeometry6 {

    public static void main(String[] args) {

        double parallelogramBase;
        double parallelogramHeight;

        Scanner in = new Scanner(;

        System.out.println("Please enter base of parallelogram: ");
        parallelogramBase = in.nextInt();

        System.out.println("Please enter height of parallelogram: ");
        parallelogramHeight = in.nextInt();

        double areaOfParallelogram = parallelogramBase * parallelogramHeight;
        System.out.println("Area of parallelogram is: " + areaOfParallelogram);


Please enter base of parallelogram: 
Please enter height of parallelogram: 
Area of parallelogram is: 63.0

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News