[SOLVED] CS (define (square x)(* x x))

$25

File Name: CS_(define_(square_x)(*_x_x)).zip
File Size: 273.18 KB

5/5 - (1 vote)

(define (square x)(* x x))

(define a (* 5 5))
(define (b) (* 5 5))

(define (sum-of-squares x y)
(+ (square x)
(square y)))

(define (f a) (sum-of-squares (+ a 1) (* a 2)))

(define (pretty-sum a b)
(display a)(display + )(display b)
(newline)(display = )
(+ a b))

(define (myfunc a)
(+ a 1)
(* a 2)
(- a a)
a)

(myfunc 17)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS (define (square x)(* x x))
$25