Assignemnt #85

Code

///colin hinton
///5th period
///Fizz
///12/3/2015

class Fizz
{
    public static void main (String [] args)
    {
        for (int x = 1 ; x <= 100 ; x = x + 1)
        {
            if ((x%3 == 0) && (x%5 == 0))
            {
                System.out.println("FizzBuzz");
            }
            else if (x%3 == 0)
            {
                System.out.println("Fizz");
            }
            else if (x%5 == 0)
            {
                System.out.println("Buzz");
            }
            else 
            {
                System.out.println(x);
            }
        }
    }
}
    

Picture of the output

Assignment 1