The Lisp Programming Language

Conversions: Example Program of Celsius to Fahrenheit

Click below to go directly to a specific section:
Description | Source Code | Sample Run | Program Notes


This program demostrates a fairly simple coversion implemented in LISP. Each time the program (CONVERT) is called it asks the user for any Fahrenheit degree, then displays the equivelant Celsius degree for the user.

Source Code

;;; This function, given a specific degree in Farhrenheit,
;;;      presents the user with equivalent Celsius degree.

(defun convert ()
(format t "Enter Fahrenheit ")
  (LET (fahr)
    (SETQ fahr (read fahr))
    (APPEND '(celsisus is) (*(- fahr 32)(/ 5 9)) )

Sample Run


Program Notes


Last modified: 2:40 AM on 10/4/1999 by Christopher Williams