import java.util.Scanner;
public class Parallelogram
{
public static void main(String[] args)
{
int a, b,area;
Scanner s = new Scanner(System.in);
System.out.print("Enter the base of parallelogram:");
a = s.nextInt();
System.out.print("Enter the height of the parallelogram:");
b = s.nextInt();
area = a * b;
System.out.println("Area of parallelogram:"+area);
}
}
Output:
Enter the base of parallelogram:5
Enter the height of the parallelogram:6
Area of parallelogram:30
No comments:
Post a Comment