Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Last active March 1, 2017 19:25
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 loliGothicK/e58de3d7e444ebbf36bdf4733649e4f8 to your computer and use it in GitHub Desktop.
Save loliGothicK/e58de3d7e444ebbf36bdf4733649e4f8 to your computer and use it in GitHub Desktop.
一般的なセミコロンレスJavaのFizzBuzzです
public class FizzBuzz {
public static void main(String[] args){
for(int i : new int[] { 1 }) // define counter
for(int dummy : new int[100])
if( (
(i%15==0) ?
System.out.printf("FIZZBUZZ\n") == null
: (i%3==0) ?
System.out.printf("FIZZ\n") == null
: (i%5==0) ?
System.out.printf("BUZZ\n") == null
: // else
System.out.printf("" + i + "\n") == null )
|| true )
{ if(++i == 0){} }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment