Board index » delphi » Help with simple pascal program

Help with simple pascal program

Quote
boxerlu...@usa.net wrote in message <7g32hg$hl...@nnrp1.dejanews.com>...
>I need help.

>I want to make a program in Turbo Pascal 7.0 for DOS that calculates the
>hypotenuse of a right triangle given the two legs or catetus.

>I know its easy. Can you please help me?

>Thanks in advance.

>Boxerlucas

>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

    Well, simply use the Pythagorean Theorem. You'll need some variables for
the legs, and you'll have to have the prompt the user to inputt these
values. Then, use the formula A^2 + B^2 = C^2 (that Pythagorean Theorem).

Some syntax for you to look at......

Sqr()
Sqrt()

This should get you started.

Hope this helps you out.
--

Jeff Freeman
cakew...@voicenet.com
http://www.voicenet.com/~cakewalk/

 

Re:Help with simple pascal program


I need help.

I want to make a program in Turbo Pascal 7.0 for DOS that calculates the
hypotenuse of a right triangle given the two legs or catetus.

I know its easy. Can you please help me?

Thanks in advance.

Boxerlucas

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Other Threads