014_while4.patch 395 B

1234567891011
  1. --- exercises/014_while4.zig 2023-10-03 22:15:22.122241138 +0200
  2. +++ answers/014_while4.zig 2023-10-05 20:04:06.906097406 +0200
  3. @@ -18,7 +18,7 @@
  4. // Oh dear! This while loop will go forever?!
  5. // Please fix this so the print statement below gives the desired output.
  6. while (true) : (n += 1) {
  7. - if (???) ???;
  8. + if (n == 4) break;
  9. }
  10. // Result: we want n=4