求A+B的程序总是出现错误,有输入输出案例,求解释what's wrong...
#include"stdio.h"int main()
{
int i,n;
long int a,b;
scanf("%d",&n);
for(i=1;i<n;i++)
{
scanf("%ld%ld",&a,&b);
printf("Case %d:\n",i);
printf("%d+%d=%d",a,b,a+b);
printf("\n");
}
scanf("%ld%ld",&a,&b);
printf("Case%d:\n",n);
printf("%d+%d=%d",a,b,a+b);
return 0;
}
Sample Input
2
1 2
112233445566778899 998877665544332211
Sample Output
Case 1:
1 + 2 = 3
Case 2:
112233445566778899 + 998877665544332211 = 1111111111111111110
提交失败
[ 本帖最后由 yenga 于 2013-11-26 14:03 编辑 ]