{{ Temperature Conversion (Version 2) {{ Juliet 2004.0 $lib rout main def f:rat, c:rat def choice:int <- 1 loop choice <> 0 printn "" printn "(0) exit program" printn "(1) C to F" printn "(2) F to C" print "? " choice <- readi cond choice = 1 print "Enter the temperature in degrees C: " c <- readr f <- (9.0/5.0 * c) + 32 printn "The equivalent in degrees F is: " & str int f cond choice = 2 print "Enter the temperature in degrees F: " f <- readr c <- 5.0/9.0 * (f - 32) printn "The equivalent in degrees C is: " & str int c cond (choice < 0) and (choice > 2) printn "Please choose again..."