Computer Science, asked by shahpavitra207, 4 months ago

Write Java program to print perimeter of a square

(where perimeter=4S)​

Answers

Answered by akashlakra1334
2

Answer:

impot java.io.*;

import java.util.scanner;

class perimeter{

public static void main (String args[ ] )throws exception{

Scanner sc=new Scanner(System.in);

int s =0; int per=0;

System.out.print("Enter the side of a square: ");

s=sc.nextInt();

per = 4 * s;

System.out.println("Ther perimeter of square is: " +per)

}

}

Similar questions