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
English,
24 days ago
Business Studies,
24 days ago
Math,
24 days ago
Math,
1 month ago
Math,
1 month ago
Social Sciences,
8 months ago