non-working break

This commit is contained in:
Dmitry Jemerov
2011-04-01 18:56:18 +02:00
parent 230c6efe99
commit 74daf3dd79
4 changed files with 52 additions and 24 deletions
+10
View File
@@ -0,0 +1,10 @@
fun fac(i: Int): Int {
var count = 1;
var result = 1;
while(true) {
count = count + 1;
result = result * count;
if (count == i) break;
}
return result;
}