Math
- Add 2 numbers
- Subtract a number from the other
- Divide a number by the other
- Use a negative number literal
Add 2 numbers
Given a file named “main.cloe” with:
(print (+ 2016 33))
When I successfully run cloe main.cloe
Then the stdout should contain exactly “2049”.
Subtract a number from the other
Given a file named “main.cloe” with:
(print (- 2049 33))
When I successfully run cloe main.cloe
Then the stdout should contain exactly “2016”.
Divide a number by the other
Given a file named “main.cloe” with:
(print (/ 84 2))
When I successfully run cloe main.cloe
Then the stdout should contain exactly “42”.
Use a negative number literal
Given a file named “main.cloe” with:
(print (- 2007 -42))
When I successfully run cloe main.cloe
Then the stdout should contain exactly “2049”.