{{#items}}

{{text}}

{{/items}} {{ctaText}}

{{#items}} {{/items}}

showing results for - "java program to find perimeter of square"

Liah

10 Mar 2017

```
1import java.util.Scanner;
2public class SquarePerimeter
3{
4 public static void main(String[] args)
5 {
6 int side, perimeter;
7 Scanner sc = new Scanner(System.in);
8 System.out.print("Please enter side length of square: ");
9 side = sc.nextInt();
10 perimeter = 4 * side;
11 System.out.print("Perimeter of square is: " + perimeter);
12 sc.close();
13 }
14}
```

Emmerson

24 Aug 2017

```
1java program to calculate area of square
2import java.util.Scanner;
3public class FindAreaOfSquare
4{
5 public static void main(String[] args)
6 {
7 Scanner sc = new Scanner(System.in);
8 System.out.println("Please enter side of square: ");
9 double side = sc.nextDouble();
10 // formula area of square = side * side
11 double area = side * side;
12 System.out.println("Area of square is: " + area);
13 sc.close();
14 }
15}
```

similar questions

sqrt in javasquare root of a number in javahow to do 4th root javajava square a numberjava code for squarejava program to find perimeter of a rectanglejava program to calculate area of rectanglejava code for magic squareprogram to find area of rectangle using inheritance in javaperimeter of rhombus in javaperimeter of rectangle java programjava program to find perimeter of rectangleperimeter of parallelogram in javajava find the perimeter of trianglesquare root of a number in java without sqrtwrite a java program to print the length and perimeter of a rectanglehow to give square in javamath square javajava program to find the perimeter of the circlefinding a given root if a number javaqueries leading to this page

write a program to find the area and perimeter of square in javaarea and perimeter of square in javawrite a java program to find the area and perimeter of a squarehow to et the perimeter of a square in javahow to get the perimeter of a square in javaperimeter of square sample java programperimeter of square in javajava program to find perimeter of squareperimeter of square simple java programsquare perimeter java rmijava program to find area and perimeter of squareperimeter of square using abstraction java programjava program to find perimeter of square your answer for

you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content

please ensure to add code which is syntactically corrent and executes properly

ask question on maxinterview

you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content

please be clear, to the point and respectful