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 >
Text File  |  1991-09-24  |  823b  |  35 lines

  1.  
  2. Listing 3
  3. **************
  4.  
  5.    struct s_compare find_min_max(one, two, three);
  6.    int one, two, three;  /* Input values to compare */
  7.        {
  8.        struct s_compare compare;
  9.        {
  10.        if (one > two)
  11.            {
  12.            if (one > three)
  13.                compare.maximum = one;
  14.            else
  15.                compare.maximum = three;
  16.            if (two > three)
  17.                compare.minimum = three;
  18.            else
  19.                compare.minimum = two;
  20.        else
  21.            {
  22.            if (two > three)
  23.                compare.maximum = two;
  24.            else
  25.                compare.maximum = three;
  26.            if (one > three)
  27.                compare.minimum = three;
  28.            else
  29.                compare.minimum = one;
  30.            }
  31.        return compare;
  32.        }
  33. **********
  34.  
  35.