Answer:
The program in Python is as follows:
A = int(input("Side A: "))
B = int(input("Side B: "))
C = int(input("Side C: "))
D = int(input("Side D: "))
E = int(input("Side E: "))
A1 = A * B
A2 = (D - B - E)*(A - C)
A3 = 0.5 * E * (A - C)
Area = A1 + A2 + A3
print("Area:",Area)
Step-by-step explanation:
One reason, you're getting a negative answer is that you probably entered a greater value for side C than A. Side A is meant to be greater than side C. Since the program do not need to be validated, you have to be careful with your inputs.
Another reason could be that your program is incorrect.
Get input for sides A to E
A = int(input("Side A: "))
B = int(input("Side B: "))
C = int(input("Side C: "))
D = int(input("Side D: "))
E = int(input("Side E: "))
Calculate rectangle area 1 (A1)
A1 = A * B
Calculate rectangle area 2 (A2)
A2 = (D - B - E)*(A - C)
Calculate the triangle area 3 (A3)
A3 = 0.5 * E * (A - C)
Calculate the total area
Area = A1 + A2 + A3
Print the calculated area
print("Area:",Area)