SHARE
TWEET

Untitled

a guest Jun 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         private long calculate()
  2.         {
  3.             int points = 1;
  4.             long count = 1;
  5.             bool goingUp = true;
  6.             for (int i = 0; i < 20; i++)
  7.             {  
  8.                 if (goingUp)
  9.                     count = count * (points++ * 2);
  10.                 else
  11.                     count = count * (long)(points-- * 2);
  12.                 if (points == 20)
  13.                     goingUp = !goingUp;
  14.             }
  15.             return count;
  16.         }
RAW Paste Data
Want to get better at C#?
Learn to code C# in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top