Skip to content

Instantly share code, notes, and snippets.

@ridvanbaluyos
Created March 30, 2018 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridvanbaluyos/b93b92fc8a05dbc22c5b00242c7a12fa to your computer and use it in GitHub Desktop.
Save ridvanbaluyos/b93b92fc8a05dbc22c5b00242c7a12fa to your computer and use it in GitHub Desktop.
Convert Fahrenheit to Celsius using Common Lisp
(defun f-to-c ()
(format t "~%Please enter Fahrenheit temperature: ")
(let*
(
(ftemp (read))
(ctemp (* (- ftemp 32) 5/9))
)
(format t
"~%~s degrees Fahrenheit is ~s degrees Celsius~%"
ftemp
(float ctemp)
) ;; print floated value
ctemp ;; return ration value
)
)
@Afsana-Shaikh
Copy link

Output

@DonovanCooper
Copy link

ku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment