标签:
1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 int a[22]; 7 int cmp(int x,int y) 8 { 9 return x>y; 10 } 11 int main() 12 { 13 int x,i; 14 int r=0; 15 while(~scanf("%d",&x)) 16 { 17 if(x==0) 18 break; 19 a[r++]=x; 20 } 21 sort(a,a+r,cmp); 22 printf("%d\n",a[1]); 23 return 0; 24 }
标签:
原文地址:http://www.cnblogs.com/cancangood/p/4392307.html