#include<iostream>//compare the amount of five nums 1.0using namespace std;int main(){ int a,b,c,d,e; cout<<"plesase input 5 num"<<"systerm will tell you which one is the bigest"<<endl; cin>>a>>b>>c>>d>>e;//相当于scanf int arr[5]={a,b,c,d,e}; int temp=arr[0]; int i=1; while (i<20) { i++;//i is used to limit the times of while if(arr[0]>arr[1]){ temp=arr[0]; arr[0]=arr[1]; arr[1]=temp; } if(arr[1]>arr[2]){ temp=arr[1]; arr[1]=arr[2]; arr[2]=temp; } if(arr[2]>arr[3]){ temp=arr[2]; arr[2]=arr[3]; arr[3]=temp; } if(arr[3]>arr[4]){ temp=arr[3]; arr[3]=arr[4]; arr[4]=temp; } } cout<<arr[0]<<"<"<<arr[1]<<"<"<<arr[2]<<"<"<<arr[3]<<"<"<<arr[4]; return 0;}