Files
kotlin-fork/backend.native/tests/codegen/function/arithmetic.kt
T
Vasily Levchenko 3a738b2ad3 arithmetic test
2016-10-11 11:41:37 +03:00

5 lines
221 B
Kotlin

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