Question
Program to calculate the perimeter of the square.
Share code with your friends
Share on whatsapp
Share on facebook
Share on twitter
Share on telegram
Code
import java.util.Scanner;
public class perimeterOfSquare
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a length of square");
double a=sc.nextDouble();
/*Formula of perimeter of square =4*(length of square)*/
double perimeter=4*a;
System.out.println("perimeter of square="+perimeter);
}
}
Coding Store
Sale

ISC QUESTION PAPERS WITH SOLUTION(PROGRAMMING ONLY)
Sale

ICSE QUESTION PAPER WITH SOLUTION(PROGRAMMING ONLY)
Sale

ISC QUESTION PAPERS WITH SOLUTION(PROGRAMMING ONLY)
Sale

ICSE QUESTION PAPER WITH SOLUTION(PROGRAMMING ONLY)
Sale

ISC QUESTION PAPERS WITH SOLUTION(PROGRAMMING ONLY)
Sale
