Advertisement
Guest User

Untitled

a guest
Mar 31st, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main {
  6.  
  7.     public static void main (String[] args) {
  8.         for (int i = 0, count3 = 0, count5 = 0, isNeedSeparator = 0; i < 100; ++i, ++count3, ++count5,
  9.                 System.out.print((count3 == 3 && 0 == (count3 = 0) && 1 == (isNeedSeparator = 1) ?
  10.                         "Fizz"
  11.                         : ((isNeedSeparator == 1 && 0 == (isNeedSeparator = 0)) ?
  12.                             " "
  13.                             : ""))
  14.                         + (count5 == 5 && 0 == (count5 = 0) && 0 == (isNeedSeparator = 0) ?
  15.                             "Buzz "
  16.                             : "")
  17.                 ));
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement