Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public class Main {
  2.  
  3. public static void main(String[] args){
  4. for(int i = 1; i < 101; i++){
  5. String print = (i % 3 == 0) ? "fizz" : (i % 5 == 0) ? "buzz" : (i % 15 == 0) ? "fizzbuzz" : "" + i;
  6. System.out.println(print);
  7. }
  8. }
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement