You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/basic-demo-3/sample-math.rkt

10 lines
229 B
Racket

8 years ago
#lang basic-demo-3
8 years ago
10 rem all results should be 1
20 print 1 - 2 * 3 + 4 * 5 - 6 = 9
30 print (1 - 2) * (3 + 4) * (5 - 6) = 7
40 print 1 / 4 = .25
50 print 2 ^ 3 = 8
60 print 9 ^ 0.5 = 3
8 years ago
70 print 6 mod 2 = 0
80 print 5 mod 2 = 1