SHARE
TWEET

Untitled

a guest Nov 13th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static int[] Assigning ()
  2.         {
  3.             // Initialization.
  4.             int f = 0, s = 0;
  5.             int[] resArr = new int[101];
  6.  
  7.             // Logic.
  8.             for(int i = 0; i < resArr.Length; i++)
  9.             {
  10.                 if (f == 0)
  11.                 {
  12.                     f = i + 1;
  13.                     resArr[i] = f;
  14.                     s = 0;
  15.                 }
  16.                 else if(s == 0)
  17.                 {
  18.                     s = i + 1;
  19.                     resArr[i] = s;
  20.                     f = 0;
  21.                 }
  22.             }
  23.  
  24.             // Output.
  25.             return resArr;
  26.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top