- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int a;
- int b;
- cout<< "請輸入a:" << endl;
- cin>> a;
- cout<< "請輸入b:" << endl;
- cin>> b;
- cout<< " a是:"<< a;
- cout<< " b是:"<< b;
- if (a > b)
- {
- cout << "a大於b" << endl;
- }
- if (a < b)
- {
- cout << "a小於b" << endl;
- }
- if (a == b)
- {
- cout << "a 等於b" << endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |