Assignemnt #85 and FizzBuzz
Code
/// name: Leila Ordukhani
/// period: 6
/// program name: Seventy-Third Program
/// file name: FizzBuzz.java
/// date finished: 2/11/16
import java.util.Scanner;
public class FizzBuzz
{
public static void main( String[] args )
{
for ( int x = 1; x <= 100; x++ )
{
System.out.print(x);
if ( x % 3 == 0 && x % 5 == 0 )
{
System.out.print("FizzBuzz");
}
else if ( x % 5 == 0 )
{
System.out.print("Buzz");
}
else if ( x % 3 == 0 )
{
System.out.print("Fizz");
}
else
{
System.out.print(x);
}
System.out.println();
}
}
}
Picture of the output