acm杭电1002题求大神帮我看看
#include <stdio.h>#include<string.h>
int main()
{
int n,j,k,s1,s2,leap=0,t,s,i;
char a[1000],b[1000];
int c[1001];
char *p,*p1,*p2;
while(scanf("%d",&n)!=EOF)
{
for(i=0;i<n;i++)
{
scanf("%s",a); scanf("%s",b);
p1=a; p2=b;
s1=strlen(a); s2=strlen(b);
if(s1>1) p1=p1+s1;
if(s2>1) p2=p2+s2;
if(s1>s2) p=a;
else p=b;
k=s1;
if(s1<s2) k=s2;
for(j=0;j<k;j++)
{
t=*p1-48+*p2-48;
if(leap==1){t++; leap=0;}
if(t>9){t=t%10; leap==1;}
c[j]=t; p1--; p2--;
printf("{%c+%c+%d+%d}",*p1,*p2,t,c[j]);
}
s=j;
printf("Case %d:\n",i+1);
printf("%s + %s = ",a,b);
while(leap==1)
{
if(s1==s2)
{ c[j]=1; leap=0;}
else
{
t=p[j]-47;
if(t>9) t=t%10;
else leap =0;
c[j]=t;
j++;
}
for(j=0;j<s1-k||j<s2-k;j++)
printf("%c",p[j]);
while(s>=0)
{ printf("%d",c[s]); s--;}
}
printf("\n\n");
}
}
return 0;
}c数组赋值进不去,也输出不出来