标签:des style blog io color sp div on log
1 #include <stdio.h> 2 3 int main(){ 4 int x; 5 int y; 6 int x_min; 7 int x_max; 8 int y_min; 9 int y_max; 10 int time; 11 12 while(1){ 13 time=0; 14 while(1){ 15 scanf("%d%d",&x,&y); 16 17 if(x==0 && y==0) 18 break; 19 20 time++; 21 if(time==1){ 22 x_min=x; 23 x_max=x; 24 y_min=y; 25 y_max=y; 26 } 27 28 if(x>x_max) 29 x_max=x; 30 31 if(x<x_min) 32 x_min=x; 33 34 if(y>y_max) 35 y_max=y; 36 37 if(y<y_min) 38 y_min=y; 39 } 40 41 if(time==0) 42 break; 43 44 printf("%d %d %d %d\n",x_min,y_min,x_max,y_max); 45 } 46 47 return 0; 48 }
标签:des style blog io color sp div on log
原文地址:http://www.cnblogs.com/zqxLonely/p/4067007.html