RSS Forums RSS
Please support our Legacy and Other Languages advertiser: Programming Forums
Views: 2566 | Replies: 0
Reply
Join Date: Jan 2006
Posts: 6
Reputation: yoshi4483 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
yoshi4483 yoshi4483 is offline Offline
Newbie Poster

Help Did I use the correct pseudocode?

  #1  
Jan 31st, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
All times are GMT -4. The time now is 2:21 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC