/*REXX*/
/*REXX*/
/*--- F2C - C2F - K2F - F2K ----------------- 1990 - MARK MCDONALD  --*/
  SAY " "
  SAY "*** CONVERT FARHRENHEIT TO CELSIUS ***"
  SAY " "
  SAY "                      S/B      IS"
  SAY "EXAMPLE:  F2C(100)    37.777   "F2C(100)
  SAY "          F2C(90)     32.222   "F2C(90)
  SAY "          F2C(80)     26.666   "F2C(80)
  SAY "          F2C(70)     21.111   "F2C(70)
  SAY "          F2C(60)     15.555   "F2C(60)
  SAY "          F2C(50)     10.000   "F2C(50)
  SAY "          F2C(40)      4.444    "F2C(40)
  SAY "          F2C(30)     -1.111   "F2C(30)
  SAY "          F2C(20)     -6.666   "F2C(20)
  SAY "          F2C(10)    -12.222  "F2C(10)
  PULL Z
  SAY " "
  SAY "*** CONVERT CELSIUS TO FAHRENHEIT ***"
  SAY " "
  SAY "              CELSIUS   S/B    IS"
  SAY "              -------   ---    ---"
  SAY "EXAMPLE:  C2F(37.777)   100   "C2F(37.777)
  SAY "          C2F(32.222)    90   "C2F(32.222)
  SAY "          C2C(26.666)    80   "C2F(26.666)
  SAY "          C2F(21.111)    70   "C2F(21.111)
  SAY "          C2F(15.555)    60   "C2F(15.555)
  SAY "          C2F(10.000)    50   "C2F(10.000)
  SAY "          C2F(4.444)     40   "C2F(4.444)
  SAY "          C2F(-1.111)    30   "C2F(-1.111)
  SAY "          C2F(-6.666)    20   "C2F(-6.666)
  SAY "          C2F(-12.222)   10   "C2F(-12.222)
  PULL Z
  SAY " "
  SAY "*** CONVERT KELVIN TO FAHRENHEIT ***"
  SAY " "
  SAY "              KELVIN    S/B    IS"
  SAY "              -------   ---    ---"
  SAY "EXAMPLE:  K2F(293)      68    "||K2F(293)
  SAY "          K2F(310)      98    "||K2F(310)
  SAY "          K2F(0)      -459  "||K2F(0)
  SAY "          K2F(574)     574   "||K2F(574)
  PULL Z
  SAY " "
  SAY "*** CONVERT FAHRENHEIT TO KELVIN ***"
  SAY " "
  SAY "         FAHRENHEIT     S/B    IS"
  SAY "          -------       ---    ---"
  SAY "EXAMPLE:  F2K(50)       227   "||F2K(50)
  SAY "          F2K(70)       294   "||F2K(70)
  SAY "          F2K(0)        255   "||F2K(0)
  SAY "          F2K(1000)     810   "||F2K(1000)
  PULL Z
EXIT
/*--- CELSIUS TO FAHRENHEIT ------------------------------------------*/
C2F: PROCEDURE
  PARSE ARG DEGC
  TR = ((DEGC * 1.8) + 32)
RETURN TR
/*--- FAHRENHEIT TO CELSIUS ------------------------------------------*/
F2C: PROCEDURE
  PARSE ARG DEGF
  TR = (DEGF - 32)/1.8
RETURN TR
/*--- KELVIN TO FAHRENHEIT -------------------------------------------*/
K2F: PROCEDURE
  PARSE ARG DEGK
  TR = (((DEGK-273.15) * 1.8) + 32)
RETURN TR
/*--- FAHRENHEIT TO KELVIN -------------------------------------------*/
F2K: PROCEDURE
  PARSE ARG DEGF
  TR = ((((DEGF -32) * 5) / 9) + 273.15)
RETURN TR
/*--------------------------------------------------------------------*/