} cout<<"最大整数:"<<max<<"\n最小整数:"<<min<<endl;}
include <stdlib.h> int main(){int max,min,num;printf("Input numbers,-1 to end:\n");scanf("%d",&num);max=min=num;while(num!=-1){ if(num>max)max=num;if(num<min)min=num;scanf("%d",&num);} printf("max:%d,min:%d\n",max,min);system("pause");return 0;} ...