本帖最後由 譚暐霖 於 2016-11-12 15:19 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- re:
- int a,b,c;
- cout<<"Please enter a number for a: "<<endl;
- cin>>a;
- cout<<"Please enter another number for b: "<<endl;
- cin>>b;
- cout<<"Please enter another number for c: "<<endl;
- cin>>c;
- if(a>b>c)
- cout<<"a>b>c"<<endl;
- else if(a>c>b)
- cout<<"a>c>b"<<endl;
- else if(a>c>b)
- cout<<"a>c>b"<<endl;
- else if(b>c>a)
- cout<<"b>c>a"<<endl;
- else if(c>a>b)
- cout<<"c>a>b"<<endl;
- else
- cout<<"c>b>a"<<endl;
-
- goto re;
- system("pause");
- return 0;
-
- }
複製代碼 |