003_assignment.patch 541 B

123456789101112131415161718
  1. --- exercises/003_assignment.zig 2023-10-03 22:15:22.122241138 +0200
  2. +++ answers/003_assignment.zig 2023-10-05 20:04:06.856096469 +0200
  3. @@ -34,12 +34,12 @@
  4. const std = @import("std");
  5. pub fn main() void {
  6. - const n: u8 = 50;
  7. + var n: u8 = 50;
  8. n = n + 5;
  9. - const pi: u8 = 314159;
  10. + const pi: u32 = 314159;
  11. - const negative_eleven: u8 = -11;
  12. + const negative_eleven: i8 = -11;
  13. // There are no errors in the next line, just explanation:
  14. // Perhaps you noticed before that the print function takes two