PDA

View Full Version : course work (pls help)



alex_loh33
10-12-2000, 02:30 PM
Hi :
I'm a computer study student. I'm wonder whether this is the right place for me to post questions related to course work ? I've problem in solving the following question... I would appreciate if you could help to provide solution for it (may be just with the program logic...and i'll do the coding by myself, is it ok ?) TNX.
================================================== =========================
Q: A module reads 3 integer values. The 3 values are interpreted as representing the lengths of the sides of a triangle. The module prints a message that states whether the triangle is scalene, isosceles, or equilateral.
a) Produce a Pseudocode for the module described above.
b) The following sets of test data was provided for testing the program.
(i) 5, 6, 7
(ii) 5, 5, 0
(iii) 6, 6, 6
One of the sets of data given has error in it. Suggest a way to
correct it.
================================================== =========================

alex

Charles Kozierok
10-13-2000, 08:19 AM
I won't answer your questions for you, but I will ask some questions to help you answer them:
[list=1]
What is the relationship between the angles of a triangle and its type (isoceles, scalene or right-angle)?
How can you determine this from the lengths of the sides? Do the lengths of a triangle's sides correspond to any of its angles?
What are valid integer values for the length of a triangle?
For certain types of triangles, can you determine the length of one side if you know the length of the other two?
[/list=a]
That should help a bit but still let you learn what you are supposed to learn here. http://www.PCGuide.com/ubb/smile.gif

------------------
Charles M. Kozierok
Webslave, The PC Guide (http://www.PCGuide.com)
Comprehensive PC Reference, Troubleshooting, Optimization and Buyer's Guides...
Note: Please reply to my forum postings here on the forums. Thanks.