Write a program in java to accept the side of a square and calculate its perimeter
Answers
Answered by
9
import java.util.*;
public class Perimeter
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int a,b;
System.out.println("Enter the side of the square");
a=in.nextInt();
b=s*4;
System.out.println("Display the perimeter"+b);
}
}
Similar questions