need help

#include <stdio.h>

int main()
{
int test;
scanf("%d", &test);
while(test–)
{
int n, rev = 0;
scanf("%d", &n);
while(n != 0)
{
rev = rev*10 + n%10;
n /= 10;
}
printf("%d\n", rev);
}
return 0;
}

Can you provide details about which compiler you are using? I have checked the answer, it has no errors and it is providing right answer.

It is running in Dev C++ but when i try to run this in codechef compiler wrong answer is encountered.