Tests for "while" and "do-while" loop generation

This commit is contained in:
Konstantin Anisimov
2016-11-02 16:17:04 +03:00
committed by vvlevchenko
parent bfb6e448c5
commit 152e738e23
5 changed files with 44 additions and 0 deletions
@@ -0,0 +1,7 @@
fun cycle_do(cnt: Int): Int {
var sum = 1
do {
sum = sum + 2
} while (sum == cnt)
return sum
}