Question
Program to find the area of the parallelogram.
Share code with your friends
Share on whatsapp
Share on facebook
Share on twitter
Share on telegram
Code
import java.util.Scanner;
public class areaOfParellogram
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the base of Parellogram");
double base=sc.nextDouble();
System.out.println("Enter the height of Parellogram");
double height=sc.nextDouble();
/*area of Parellogram=base of Parellogram*height of Parellogram*/
double area=base*height;
System.out.println("Area of the Parellogram="+area);
}
}