Computer Science, asked by rhea992, 9 months ago

write a program in java to input the side of a square and find its perimeter and area ​

Answers

Answered by fanya5547
4

Explanation:

please mark me as a brainliest

Attachments:
Answered by AjayKumarr676
19

import java.util*;

public class Scanner

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

float s,p,a;

System.out.println("Enter the side of the square");

s=in.nextFloat();

p=(4*s);

System.out.println("The perimeter of square is="+p);

a=Math.pow(a,2);

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

}

}

Similar questions