Computer Science, asked by jeevithag545, 6 hours ago

Write a program to accept side of a square. calculated and display the area, perimeter or diagonal of a square as per the user's choice. Enter 'a' to calculate area of a square enter 'p' to calculate perimeter of a square and enter 'd' to calculate diagonal of a square.

(Hint : Area =(side)² Perimeter =4×side Diagonal = ✓2×(side))

Write a Java expression ​

Answers

Answered by KokilaAbhishek
0

Explanation:

k=int(input("enter side of a square: "))

a=k²

p=4k

d=√2k

print("Area of square is: "))

print("Perimeter of square is: "))

print("diagonal of square is: "))

hope it helps u

Similar questions