Write a JAVA Program to calculate and print the area of square with given height and width.

 package area;

public class Area {

    public static void main(String[] args) {

                int height;

int width;

int area;

height = 5;

width = 4;

area = height * width;

System.out.print("Area of Square = ");

System.out.print(area);

    }

    

}

OUTPUT
Area of Square = 20

No comments:

Post a Comment