How do you write a program in pascal to find area of a trapezium using pascal?

1 answer

Answer

1209766

2026-02-14 17:05

+ Follow

To write a program in Pascal to find the area of a trapezium, you can follow this structure:

<code class="language-pascal">program AreaOfTrapezium;

var a, b, height, area: real; begin writeln('Enter the lengths of the two parallel sides (a and b) and the height:'); readln(a, b, height); area := 0.5 * (a + b) * height; writeln('The area of the trapezium is: ', area:0:2); end.

</code>

This program prompts the user for the lengths of the parallel sides and the height, calculates the area using the formula ( \text{Area} = 0.5 \times (a + b) \times \text{height} ), and then outputs the result.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.