1011. A+B和C

 1 /*
 2  * Main.c
 3  * 1011. A+B和C
 4  *  Created on: 2014年8月30日
 5  *      Author: Boomkeeper
 6  *********测试通过*******
 7  */
 8 
 9 #include <stdio.h>
10 
11 void compare(long a,long b,long c){
12     if(a+b>c)
13         printf("true\n");
14     else
15         printf("false\n");
16 }
17 
18 int main(void){
19 
20     int t;//题目中的t
21     int i;
22     long a,b,c;
23 
24     scanf("%d",&t);
25     getchar();
26 
27     for(i=0;i<t;i++){
28         scanf("%ld %ld %ld",&a,&b,&c);
29         getchar();
30         printf("Case #%i: ",i+1);
31         compare(a,b,c);
32     }
33 
34     return 0;
35 }

 

题目链接:

http://pat.zju.edu.cn/contests/pat-b-practise/1011

 

 

.

posted @ 2014-09-01 20:24  Boomkeeper  Views(294)  Comments(0Edit  收藏  举报
最好的流量统计 网站流量计数器