wap to input the length of squar and print the area and peromiter
Answers
Answered by
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
Computer Science,
1 month ago
Computer Science,
1 month ago
Math,
1 month ago
Math,
2 months ago
Math,
2 months ago
Social Sciences,
9 months ago