2013.7.15DAY2

今天自己做了炸土豆 吼吼~

才知道鸡蛋和小麦粉一起弄成浆糊涂到土豆条上炸效果很好~
不过做失败了一些啦 失败的就用青椒炒着吃。。。。

下午准备做冰品来着。。。结果快递都到了特别忙。。。就只弄了杯冰啤酒。。。

虐了两道水题,贴上代码。。过于水了。。。

Description

 

读入三个整数a、b、c,找出中间数并输出。若有两个数相同,最大数作为中间数。

 

Input

 

有多组测试数据。每一组测试数据只有一行,分别为整数a、b和c,相邻两数之间有一个空格。该行没有其它多余的符号。如果一行三个数字均为0,表示输入结果,该行不需要处理。-2^31<a,b,c<2^31。

 

Output

 

对应每组输入,输出一行三个数的中间数。该行不能有其它多余的符号。

 

Sample Input

 

2 3 4 12 35 12 13 13 10 0 0 0

 

Sample Output

 

3 35 13

 1 #include<stdio.h>
 2 int main()
 3 { int a,b,c;
 4     while(scanf("%d%d%d",&a,&b,&c))
 5     {
 6     if(a==0 && b==0 && c==0)
 7     break;
 8     if (( a>b && b>c)||( a<b && b<c)) {printf("%d\n",b);continue;}
 9     if (( a>c && c>b)||( a<c && c<b)) {printf("%d\n",c);continue;}
10     if (( b>a && a>c)||( b<a && a<c)) {printf("%d\n",a);continue;}
11     if (a==b)
12        {if (c>a) {printf("%d\n",c);continue;}
13        else {printf("%d\n",a);continue;}}
14     if (b==c)
15          {if (a>b) {printf("%d\n",a);continue;}
16        else {printf("%d\n",b);continue;}}
17     if (a==c)
18          {if (b>a) {printf("%d\n",b);continue;}
19        else {printf("%d\n",a);continue;}}
20 
21     }
22     return 0;
23 }                     

posted on 2013-07-15 17:48  BWB  阅读(243)  评论(0编辑  收藏  举报

导航