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