0

I'm trying to write a pseudocode for finding the area of a trapezoid. Is this right?

THIS IS THE GIVEN INFORMATION


Write a Fortran 90 program to compute the area of the trapezoid.

Upon execution of the program, the user (you) will be prepared to provide the lengths of the two bases - and - in cm. The programmer (you) is told in advance that the height (h) is 3 cm. Your Fortran program should request from the user the two REAL values representing the lengths of the bases and using the value of 3 cm for the height of the trapezoid, compute the area of the trapezoid. Your program should output to the screen the following values: a “title (example shown below), the lengths of the two bases, the height, and the area. You (the user at run time) should provide the executing program with lengths 4.2 cm and 5.6 cm, respectively, for the first and second base lengths.


For example, your output may appear as:

Trapezoid Area Computation

The length of the first base: 4.2
The length of the second base: 5.6
The height: 3
The area: ????


THIS IS MY PSEUDOCODE


Pseudocode –

-identify the formula for finding the area of a trapezoid
-assign characters to the variables of equation
-prompt the user to use the integer value of 3 for the height
-run the program
-prompt the user to enter the value of the first real base as 4.2
-prompt the user to enter the value of the second real base as 5.6
-compute area of the trapezoid
-display the result

2
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by yoshi4483
0

Maybe your instructor is using a different definition of pseudocode than is normally used. What is his/her's definition of pseudocode?

0

short, English phrases used to explain specific tasks within a program's algorithm; should not include keywords in any specific computer languages;should be written as a list of consecutive phrases

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.