home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_12
/
9n12120c
< prev
next >
Wrap
Text File
|
1991-09-24
|
823b
|
35 lines
Listing 3
**************
struct s_compare find_min_max(one, two, three);
int one, two, three; /* Input values to compare */
{
struct s_compare compare;
{
if (one > two)
{
if (one > three)
compare.maximum = one;
else
compare.maximum = three;
if (two > three)
compare.minimum = three;
else
compare.minimum = two;
else
{
if (two > three)
compare.maximum = two;
else
compare.maximum = three;
if (one > three)
compare.minimum = three;
else
compare.minimum = one;
}
return compare;
}
**********