ou are given a side of a square as input. Write a program to find the perimeter and area of the square.
Input
The input is an integer representing the length of the side of the square.
Output
The first line of the output should contain area of the square, and the second line of the output should contain the perimeter of the square as per the format shown in the sample output.
Explanation
Given the length of the side is 2.
As the area of square is side*side and the perimeter of the square is 4*side.
Then output should be
4
8
Sample Input 1
3
Sample Output 1
9
12
Sample Input 2
4
Sample Output 2
16
16
side=int(input())
print(side*side)
print(4*side)
Comments
Leave a comment