- #include<cstdlib>
- using namespace std;
- int main(){
- int q,w,e;
-
- re:
- cout<<"請任意輸入三個數:";
- cin>>q>>w>>e;
-
- if(q>w && w>e)
- cout<<q<<">"<<w<<">"<<e<<endl;
- else if(q>e && e>w)
- cout<<q<<">"<<e<<">"<<w<<endl;
- else if(q>e && e==w)
- cout<<q<<">"<<e<<"="<<w<<endl;
- else if(q==e && e>w)
- cout<<q<<"="<<e<<">"<<w<<endl;
- else if(e>q && q>w)
- cout<<e<<">"<<q<<">"<<w<<endl;
- else if(e>w && w>q)
- cout<<e<<">"<<w<<">"<<q<<endl;
- else if(e>w && w==q)
- cout<<e<<">"<<w<<"="<<q<<endl;
- else if(e==w && w>q)
- cout<<e<<"="<<w<<">"<<q<<endl;
- else if(w>e && e>q)
- cout<<w<<">"<<e<<">"<<q<<endl;
- else if(w>q && q>e)
- cout<<w<<">"<<q<<">"<<e<<endl;
- else if(w>e && e==q)
- cout<<w<<">"<<e<<"="<<q<<endl;
- else if(w==e && e>q)
- cout<<w<<"="<<e<<">"<<q<<endl;
- else
- cout<<w<<"="<<e<<"="<<q<<endl;
-
- goto re;
- system("pause");
- return 0;
-
- }
複製代碼 |