Help with debugging Pascal program wanted.
Hello everyone. I wrote a Pascal program to calculate the volume of triangles (I was bored ...) but it appears to be buggy.
If someone could point me to where it went wrong that would be great, thanks. Code:
program tv; |
Triangles have area, not volume. That's where you went wrong. :D
-------------------- Steve Stites |
How can you tell it is buggy?
I assum you know you calculate some kind of wedge shape. not a tetraeder or whatever that is called in English. jlinkels |
Hello,
For starters, your basic formula for calculating the area is wrong. Code:
af := triangleside + trianglebottom; You need to multiply triangle height by triangle bottom. Triangle side would only work in a right angle triangle. Area Formulas |
Quote:
|
All times are GMT -5. The time now is 03:31 PM. |