![]() |
#2
hahayezhe2010-03-13 20:09
|
#include<iostream.h>
void main(){
int a,b,c,x,y;
cout<<"请输入三个整数:"<<endl;
cin>>a>>b>>c;
if (a>b) x=a;
else x=b;
if (x>c) y=x;
else y=c;
cout<<"最大的数为:"<<y<<endl;
if (a<b) x=a;
else x=b;
if (x<c) y=x;
else y=c;
cout<<"最小的数为:"<<y<<endl;
}