• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Who can code?
#28
Code:
for (int i = 1; i < 101; i++)
            {
                if (i % 5 == 0 && i % 3 == 0)
                    Console.WriteLine("FizzBuzz");

                else if (i % 3 == 0)
                    Console.WriteLine("Fizz");

                else if (i % 5 == 0)
                    Console.WriteLine("Buzz");

                else
                    Console.WriteLine(i);
            }

            Console.ReadLine();
        }
  Reply


Messages In This Thread
Who can code? - by Pack3t SynAck3r - 02-07-2010, 01:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [C++] Minesweeper Trainer - Source Code Clones 0 9,155 13-11-2011, 01:19 PM
Last Post: Clones

Forum Jump: