home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
borland
/
jnfb88.arc
/
PALPRO.ARC
/
HYPO.C
< prev
next >
Wrap
Text File
|
1987-10-07
|
389b
|
25 lines
#include <stdio.h>
#include <math.h>
float Hypotenuse(x,y)
int x,y;
{
float w,z;
w = x*x;
z = y*y;
return sqrt(w+z);
}
main()
{
int x,y;
x = 4;
y = 5;
printf("If a right triangle has sides %d and %d,\n",x,y);
printf("then its hypotenuse is %f.\n",Hypotenuse(x,y));
}