Assignemnt #81 Fizz Buzz!

Code

/// Name: JJ Deng
    /// Period: 6
    /// Program Name: Fizz Buzz
    /// File Name: FizzBuzz.java
    /// Date Finished: 2/8/2016
  
     import java.util.Scanner;
      
     public class FizzBuzz
      {
          public static void main( String[] args )
          {
             for( int x=3; x<= 177; x++)
             {
                 int n= x % 3;
                 int y= x % 5;
                 if ( n==0 && y!= 0 )
                 {
                     System.out.println( "Fizz");
                 }
                 else if ( y==0 && n!= 0 )
                 {
                     System.out.println( "Buzz");
                 }
                 else if( n==0 && y==0)
                 {
                     System.out.println( "FizzBuzz");
                 }
                 else
                 {
                     System.out.println(x);
                 }
             }
          }
     }

  

Picture of the output

Assignment 85