Created
November 5, 2016 06:10
-
-
Save KaiaKitten/b30673c6a0d84e7e574619b2b2091239 to your computer and use it in GitHub Desktop.
Old fizzbuzz test in one line.
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 Main{public static void main(String[] args){for(int i=1;i<=100;i++){System.out.println(i % 3 == 0 & i % 5 == 0 ? "fizzbuzz" : (i % 3 == 0 ? "fizz" : (i % 5 == 0 ? "buzz" : i))); }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment