summaryrefslogtreecommitdiff
path: root/examples/algorithms/sieve.zc
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 15:12:12 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 15:12:12 +0000
commit7d1944ab9d2307f2736afe8520436872db1c7617 (patch)
tree7380a4f148f9ce0b70ed9f02cfa5e8561c783a7a /examples/algorithms/sieve.zc
parent8b720543f538862796fec0ff6b7ea12cb140bf0f (diff)
'let' it be
Diffstat (limited to 'examples/algorithms/sieve.zc')
-rw-r--r--examples/algorithms/sieve.zc4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/algorithms/sieve.zc b/examples/algorithms/sieve.zc
index 25e2c5a..2f5680e 100644
--- a/examples/algorithms/sieve.zc
+++ b/examples/algorithms/sieve.zc
@@ -4,7 +4,7 @@ import "std.zc"
fn main() {
const LIMIT = 50;
- var is_prime: bool[LIMIT];
+ let is_prime: bool[LIMIT];
for i in 0..LIMIT { is_prime[i] = true; }
is_prime[0] = false;
@@ -12,7 +12,7 @@ fn main() {
for p in 2..LIMIT {
if is_prime[p] {
- for (var i = p * p; i < LIMIT; i += p) {
+ for (let i = p * p; i < LIMIT; i += p) {
is_prime[i] = false;
}
}