Computer Science, asked by afnanali8160, 7 months ago

Write a program to find
the area of a
the square
by, in putting the values from the user formula area of a
square =side *side​

Answers

Answered by kushal454100
1

Answer:

import java.util.*;

class sq

{

   public static void main(String x[])

   {

       Scanner sc=new Scanner(System.in);

System.out.println("enter the side of the square to find the area");

double side=sc.nextInt();

double area=side*side;

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

}

}

Explanation:

output

enter the side of the square to find the area

5

the area of the square=25.0

Similar questions