Skip to content

Instantly share code, notes, and snippets.

@ktibb
Created April 14, 2012 18:36
Show Gist options
  • Save ktibb/2386780 to your computer and use it in GitHub Desktop.
Save ktibb/2386780 to your computer and use it in GitHub Desktop.
FizzBuzz
int i=1;
int z=0;
void setup() {
}
void draw() {
for (i=1; i<=100; i++) {
if (i%3==z && i%5==z) {
println ("fizzbuzz");
}
else if (i%3==z) {
println ("fizz");
}
else if (i%5==z) {
println ("buzz");
}
else {
println (i);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment