write a program to calculate the area and perimeter of a rectangle .
package com.codegym.task.task01.task0142;
/*
write a program to calculate the area and perimeter of a rectangle
*/
public class Solution {
public static void main(String[] args) {
//write your code here
int length,width,area,perimeter;
length=5;
width=10;
// Area of rectangle = length * width
area = length* width;
//perimeter of rectangle=2* (length +width)
System.out.println("Area of rectangle is:" +area);
System.out.println("perimeter of the rectangle is:" + perimeter );
}
}