Last active
June 27, 2017 01:56
-
-
Save daffodilistic/fc7c3ad9b6545e076a0a1cfbbe317b52 to your computer and use it in GitHub Desktop.
EDMW is a mean and scary place
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Mod3And5 { | |
public static void main(String args[]) { | |
for (int i = 1; i <= 100; i++) { | |
String out = ""; | |
if (i % 3 == 0) { | |
out += "Fizz"; | |
} | |
if (i % 5 == 0) { | |
out += "Buzz"; | |
} | |
if (out == "") { | |
out = String.valueOf(i); | |
} | |
System.out.println(out); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment