Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

for (int i = 1; i <= 100; i++) {

    String[] c = { String.valueOf( i ), "fizzbuzz", "buzz", "fizz" };

    // yes:0 or no:1
    int f = (int) Math.ceil( ( i % 3 ) / 3.0 );
    // yes:1 or no:2
    f += 1;

    // yes:0 or no:1
    int b = (int) Math.ceil( ( i % 5 ) / 5.0 );
    // yes:0 or no:2
    b += b;

    System.out.println( c[( f + b ) % 4] );
}

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors