Last active
September 4, 2018 15:34
-
-
Save bufferings/ab3d8c70e36747ffd45dc670789bbfa2 to your computer and use it in GitHub Desktop.
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 FizzBuzz { | |
public static void main(String[] args) { | |
for (int i = 1; i <= 30; i++) { | |
int a =(int)Math.pow(0, i % 3); | |
int b =(int)Math.pow(0, i % 5); | |
System.out.print("Fizz".repeat(a)); | |
System.out.print("Buzz".repeat(b)); | |
System.out.println(Integer.toString(i).repeat((a ^ 1) * (b ^ 1))); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment