Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 14, 2020 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/bc917287924b70e0e251bd3b05e4e19f to your computer and use it in GitHub Desktop.
Save codecademydev/bc917287924b70e0e251bd3b05e4e19f to your computer and use it in GitHub Desktop.
Codecademy export
class FizzBuzz{
public static void main(String[]args){
for(int i=1; i<=100;i++){
if (i % 15 == 0) {
System.out.println("fizzbuzz");
}else if (i % 5 == 0) {
System.out.println("buzz");
} else if (i % 3 == 0) {
System.out.println("fizz"); }
System.out.println(i); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment