Computer Science, asked by salmannawaz528, 2 months ago

Write a program to calculate the area of square using multiple
inheritance
Take input of width and height in different classes
• Calculate area in third class
.

Answers

Answered by krishanu2052
0

Answer:

first there is no need to take height and width both are sam so in my program square means any quadrlateral

In Python

a=int(input("enter width of square:-"))

b=int(input("enter height of square:-"))

area=a*b

print("Therefore, the area of the square is:-", area)

Explanation

First line: takes the input(width) stores in variable a 'int' is data type for integer values

Second line: takes height input in variable b

Third line: multiplies variable a and b stores in variable 'sum'

fourth line prints the 'sum' variable that is output(width into height)

Similar questions