arithmetic test

This commit is contained in:
Vasily Levchenko
2016-10-11 10:24:51 +03:00
parent b038dbc724
commit 3a738b2ad3
3 changed files with 24 additions and 1 deletions
@@ -0,0 +1,5 @@
fun square(a:Int):Int = a * a
fun sumOfSquares(a:Int, b:Int):Int = square(a) + square(b)
fun diffOfSquares(a:Int, b:Int):Int = square(a) - square(b)
fun mod(a:Int,b:Int):Int = a / b
fun remainder(a:Int, b:Int):Int = a % b