this code for small factorials works in my compiler but doesn't works in here.

#include<stdio.h>
int main()
{
int a[200]={0},s,m,c,x,r,n,i,cnt=0;
while(r–)
{
cnt=0;
i=199;
a[i]=1;
n=1;
s=0;
scanf("%d",&x);
do
{
m=i;
i=199;
for(c=0;c>=m;c–)
{
a[c]=a[c]*n+s;
s=s/10;
if(a[c]/10>0)
{
s=a[c]/10;
a[c]=a[c]%10;
}
i–;
}
while(s>0)
{
a[c]=a[c]*n+s;
s=s/10;
c–;
i–;
}
n++;
}while(n<=x);
for(i=200-x;i<200;i++){
if(a[i]!=0)cnt++;
if(cnt>0)
printf("%d",a[i]);}
printf("\n");
for(i=0;i<200;i++)
a[i]=0;
}
return(0);
}