diff options
author | Martin Ashby <martin@ashbysoft.com> | 2022-12-09 22:07:01 +0000 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2022-12-09 22:07:01 +0000 |
commit | 0e447c7956410a993614f9337d6219e017722443 (patch) | |
tree | c12780891cbbd14b52695df1fe336cc8981de6d9 /exercises/008_quiz.zig | |
parent | bb5b8f115a57fc8c85ac7344fe4dc0b796e32487 (diff) | |
download | ziglings-0e447c7956410a993614f9337d6219e017722443.tar.gz ziglings-0e447c7956410a993614f9337d6219e017722443.tar.bz2 ziglings-0e447c7956410a993614f9337d6219e017722443.tar.xz ziglings-0e447c7956410a993614f9337d6219e017722443.zip |
001-024 complete
Diffstat (limited to 'exercises/008_quiz.zig')
-rw-r--r-- | exercises/008_quiz.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exercises/008_quiz.zig b/exercises/008_quiz.zig index 5a81fb2..dff4da3 100644 --- a/exercises/008_quiz.zig +++ b/exercises/008_quiz.zig @@ -19,7 +19,7 @@ pub fn main() void { // the idiomatic type to use for array indexing. // // There IS a problem on this line, but 'usize' isn't it. - const x: usize = 1; + var x: usize = 1; // Note: When you want to declare memory (an array in this // case) without putting anything in it, you can set it to @@ -33,10 +33,10 @@ pub fn main() void { lang[0] = letters[x]; x = 3; - lang[???] = letters[x]; + lang[1] = letters[x]; - x = ???; - lang[2] = letters[???]; + x = 5; + lang[2] = letters[x]; // We want to "Program in Zig!" of course: std.debug.print("Program in {s}!\n", .{lang}); |