Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int[] divisors(int a)
- {
- int[] array = new int[a];
- int x = 0;
- for( int i =2; i<a; i++)
- {
- if(a % i == 0)
- {
- array[x] = i;
- x++;
- }
- }
- if(array.Length == 0)
- {
- return null;
- }
- else
- {
- return array;
- }
- }
- "Expected is <System.Int32[2]>, actual is <System.Int32[15]>
- Values differ at index [2]
- Extra: < 0, 0, 0... >"
Add Comment
Please, Sign In to add comment