HORSES - Editorial

enter code here
#include <stdio.h>
int main(void) {
int testcase, length, k = 0;
scanf("%d", &testcase);
while (k != testcase) {
scanf("%d", &length);
int number[100];
for (int m = 0; m < length; m++)
scanf("%d", &number[m]);
for (int i = 0; i < length; i++) {
for (int j = i; j < length; j++) {
if (number[i] > number[j]) {
int a = number[i];
number[i] = number[j];
number[j] = a;
}
}
}
int diff = number[1] - number[0];
printf("%d\n", diff);
k++;
}
return 0;
}

I did exactly what it says here yet I am getting wrong answer.
My solution can be found at https://www.codechef.com/viewsolution/23219949
Please tell me what’s wrong in my solution.