Program for find the area of square in java .

import java.util.*;

public class areaofsquare{

    public static void main(String[] args) {

        int side,area;

        Scanner sc =new Scanner(System.in);

        System.out.println("enter the side=");

        side=sc.nextInt();

        area=side*side;

        System.out.println("the area of  square="+area);

        }

    } 

■》 Output->

enter the side= 8

the area of square= 64

Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.