A parallelogram is a four sided shape formed by two pairs of parallel lines like a rectangle. Opposite sides of a parallelogram should be equal. How can we find the area of a parallelogram manually?

**Area of a parallelogram**=

**base**x

**height**.

This is a simple java console program to find area of a parallelogram with the measures of height and base.

__Program code__:import java.io.*; class parallelogram { public static void main(String p[]) throws IOException { BufferedReader Br = new BufferedReader(new InputStreamReader(System.in)); System.out.print("\n Enter the base : "); int a =Integer.parseInt(Br.readLine()); System.out.print("\n Enter the lenght : "); int b=Integer.parseInt(Br.readLine()); System.out.println( "\n Area of parallelogram with base "+a+" and lenght " +b+ " is :" + a*b); } } |

__Sample output__:
## No comments:

## Post a Comment