Skip to content

Commit

Permalink
loops/while: adopt fixed integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Jan 3, 2024
1 parent 5eab2b7 commit 61997b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/loops/while/main.bt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
fun main() {
mut i := 1024

// In Bait, `while` loops are replaced by `for` loops with a single condition
for i > 0 {
println(i)
i = i / 2
i /= 2
}
}
File renamed without changes.

0 comments on commit 61997b2

Please sign in to comment.