Answers for "c# program that multiples 3 numbers"

C#
0

multiple of 3 and 5 c#

static void PrintNumbers()
{
    for (int i = 1; i <= 100; i++)
    {
        if (i % 3 == 0 && i % 5 == 0)
        {
            Console.WriteLine(i + " FizzBuzz");
        }
        else if ( i % 3 == 0)
        {
            Console.WriteLine(i + " Fizz");
        }
        else if (i % 5 == 0)
        {
            Console.WriteLine(i + " Buzz");
        }           
        else
        {
            Console.WriteLine(i);
        }
    }
}
Posted by: Guest on August-04-2020

Code answers related to "c# program that multiples 3 numbers"

C# Answers by Framework

Browse Popular Code Answers by Language