Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int[] Assigning ()
- {
- // Initialization.
- int f = 0, s = 0;
- int[] resArr = new int[101];
- // Logic.
- for(int i = 0; i < resArr.Length; i++)
- {
- if (f == 0)
- {
- f = i + 1;
- resArr[i] = f;
- s = 0;
- }
- else if(s == 0)
- {
- s = i + 1;
- resArr[i] = s;
- f = 0;
- }
- }
- // Output.
- return resArr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement