|
|
|
|
|
by hallowtech
4932 days ago
|
|
I don't understand why this only gets a score of 1: static String[] c = { "", "FizzBuzz", "Buzz", "Fizz" };
public static void main(String[] args)
{
for(int i = 1; i <= 100; i++)
{
c[0] = ""+i;
int f = ((int)Math.ceil((i%3)/3.0))+1;
int b = ((int)Math.ceil((i%5)/5.0))*2;
System.out.println(c[(f+b)%4]);
}
}
|
|