Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1.         private void Test()
  2.         {
  3.             for (int i = 0; i < 100; i++)
  4.             {
  5.                 string first = (i % 3 == 0) ? "" : "FIZZ";
  6.                 string second = (i % 5 == 0) ? "" : "BUZZ";
  7.                 string firstsecond = first + second;
  8.                 string output = string.IsNullOrEmpty(firstsecond) ? i.ToString() : firstsecond;
  9.                 Debug.Log(output);
  10.             }
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement