PAT-BL-1011

来源:互联网 发布:多媒体教学软件下载 编辑:程序博客网 时间:2024/06/10 03:45

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-

0 0