My code is running in code blocks but not here any one please help me with this . it is printing the output multiplied by the previous output. but it do not do this when used in codeblocks

#include <stdio.h>

int main(void) {
int t,n;
scanf("%d",&t);
while(t>0)
{
int fact=1;
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
fact=fact*i;
}
printf("%d\n",fact);
t–;
}
return 0;
}

this should be t--;
your good to go .
from now on format code before posting questions using forum formatter.
LIKE THIS

#include <stdio.h>
int main(void) {
  int t, n;
  scanf("%d", & t);
  while (t > 0) {
    int fact = 1;
    scanf("%d", & n);
    for (int i = 1; i <= n; i++) {
      fact = fact * i;
    }
    printf("%d\n", fact);
    t– - ;
  }
  return 0;
}