Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FizzBuzz general

Name: Anonymous 2011-05-05 1:26

ITT: we show our implementations of FizzBuzz.

http://en.wikipedia.org/wiki/Bizz_buzz

package fizzbuzz;
public class Main {
public static void main(String[] args) {
int FIVE = 5;
int THREE = 3;
for (int i = 1; i < 101; i++) {
if ( (i % 5 == 0) && (i % 3 == 0) {
System.out.println("Fizz Buzz, ")
} else if (i % 5 == 0) {
System.out.println("Buzz, ")
} else if (i % 3 == 0) {
System.out.println("Fizz, ")
} else {
System.out.println(i + ", ");
}
}
}
}

Name: Anonymous 2011-05-05 10:20

>>5
You just don't see it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List