- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int x;
- int y;
- cout << "請輸入第一個數字:";
- cin >> x;
- cout << "請輸入第二個數字:";
- cin >> y;
- if(x > y)
- {
- cout << x << " > " << y <<endl;
- }
- else if( y > x )
- {
- cout << y << " > " << x <<endl;
- }
- else if( y = x )
- {
- cout << x << " = " << y <<endl;
- }
- system ("pause");
- return 0;
- }
複製代碼 |