Computer Science, asked by shayansharma6677, 1 month ago

wap to input the length of squar and print the area and peromiter​

Answers

Answered by BrainlyProgrammer
20

Answer:

//Assuming it is Java programming

import java.util.*;

class Square{

public static void main ( String ar[]){

Scanner sc= new Scanner ( System.in);

int a= sc.nextInt(); //Enter Side

System.out.println("Perimeter="+(4*a));

System.out.println("Area="+(a*a));

}

}

______

#Python Approach

a=(int)(input("Enter Side"))

print("Perimeter",(4*a))

print("Area=",(a*a))

______

QBASIC APPROACH

CLS

INPUT "ENTER SIDE";A

P=4*A

K=A*A

PRINT "PERIMETER=";P

PRINT "AREA=";K

END

•••♪

Similar questions