1 题目要求:
https://www.patest.cn/contests/pat-b-practise/1011
2 源代码:
#include <stdio.h> int main(void) { int n; scanf("%d",&n); long a,b,c; int i; for(i=1;i<=n;i++){ scanf("%ld%ld%ld",&a,&b,&c); if(a+b>c){ printf("Case #%ld: true ",i); }else{ printf("Case #%ld: false ",i); } } }
3 评测结果:通过
1