Fellas, why is this happening, especially sometimes but not other times?

Here, I run the program three times, getting the exact same correct output. On the fourth, it outputs broken numbers. The function prnStats what’s being executed.

  • Kajika
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    I would guess : global variable

    • lofenyy@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Is this likely the case if the program runs only in a single thread?