home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng)
/
ProfitPress-MegaCDROM2.B6I
/
MAGAZINE
/
MISC
/
JNFB88.ZIP
/
PALPRO.ARC
/
HYPO.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1987-10-07
|
389 b
|
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));
}