#85

Code

  /// Name: Josh Bautista
  /// Period: 6
  /// Program Name: Fizz Buzz
  /// File Name: FB.java
  /// Date Finished: 2/26/2015
  
  public class FB
{
    public static void main( String[] args )
    {
        for ( int x1 = 1 ; x1 <= 100 ; x1 = x1 + 1 )
        {
                if ( x1 % 3 == 0 && x1 % 5 == 0)
                {  
                    System.out.println( "FizzBuzz" );
                }
                else if ( x1 % 5 == 0 )
                {
                    System.out.println( "Buzz" );
                }
            else if ( x1 % 3 == 0 )
            {
                System.out.println( "Fizz");
            }
            else 
            {
                System.out.println( x1 );
            }
            }
    }
}
    

Picture of the output

Assignment 4