Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added exercise 1.1

  • Loading branch information...
commit 7debd09d20218eadaf366a1cd96ca3360c69022f 1 parent ad84d91
@cosmin authored
Showing with 33 additions and 0 deletions.
  1. +33 −0 exercise-1-1.ss
View
33 exercise-1-1.ss
@@ -0,0 +1,33 @@
+10
+; 10
+(+ 5 3 4)
+; 12
+(- 9 1)
+; 8
+(/ 6 2)
+; 3
+(+ (* 2 4) (- 4 6))
+; 6
+(define a 3)
+;
+(define b (+ a 1))
+;
+(+ a b (* a b))
+; 19
+(= a b)
+; #f
+(if (and (> b a) (< b (* a b)))
+ b
+ a)
+; 4
+(cond ((= a 4) 6)
+ ((= b 4) (+ 6 7 a))
+ (else 25))
+; 16
+(+ 2 (if (> b a) b a))
+; 6
+(* (cond ((> a b) a)
+ ((< a b) b)
+ (else -1))
+ (+ a 1))
+; 16
Please sign in to comment.
Something went wrong with that request. Please try again.