Writing FizzBuzz

I think your implementation is unnecessarily complex. This one does the job and is easier to understand: public void DoFizzBuzz() { for (int i = 1; i <= 100; i++) { bool fizz = i % 3 == 0; bool buzz = i % 5 == 0; if (fizz && buzz) Console.WriteLine (“FizzBuzz”); else if … Read more