new var declaration syntax

This commit is contained in:
2026-05-27 20:25:58 +02:00
parent 284bc61f24
commit 4fda79f0bc
48 changed files with 450 additions and 449 deletions

View File

@@ -1,7 +1,7 @@
func multiply[n: Array, x: i64] : void
let carry = 0
carry := 0
for i in 0..n->size
let prod: i64 = array.nth(n, i) * x + carry
prod : i64 = array.nth(n, i) * x + carry
array.set(n, i, prod % 10)
carry = prod / 10
while carry > 0
@@ -9,12 +9,12 @@ func multiply[n: Array, x: i64] : void
carry = carry / 10
func main[] : i64
let n = [1]
n := [1]
for i in 2..101
multiply(n, i)
let sum = 0
sum := 0
for i in 0..n->size
sum = sum + array.nth(n, i)