您的位置:首页 > 其它

PAT-BL-1011

2016-11-04 20:33 232 查看
2016-11-04记录,做题:2016-11-03

易错点:结果的取值范围为long而不是int

#include<stdio.h>

int main()
{
int t, i;
long a, b, c;
scanf("%d", &t);
for(i = 0;i < t;i++)
{
scanf("%ld%ld%ld", &a, &b, &c);
if(a-c+b > 0)
printf("Case #%ld: true\n", i+1);
else
printf("Case #%ld: false\n", i+1);
}
return 0;
}


-Fin-
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  c pat