本帖最後由 tonyh 於 2018-7-12 10:24 編輯
 - #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a, b;
- cout<<"請輸入a: ";
- cin>>a;
- cout<<"請輸入b: ";
- cin>>b;
- //cout<<"a:"<<a<<endl;
- //cout<<"b:"<<b<<endl;
- if(a>b)
- {
- cout<<"a大於b"<<endl;
- }else if(a<b)
- {
- cout<<"a小於b"<<endl;
- }else
- {
- cout<<"a等於b"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |