Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LISP

lisp input

; the function AreaOfCircle
; calculates area of a circle
; when the radius is input from keyboard

(defun AreaOfCircle()
(terpri)
(princ "Enter Radius: ")
(setq radius (read))
(setq area (* 3.1416 radius radius))
(princ "Area: ")
(write area))
(AreaOfCircle)
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #lisp #input
ADD COMMENT
Topic
Name
3+7 =