- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main () //主程式
- {
- int x = 10, y = 3;
- cout << "當x = " << x << ", y = " << y << "時..." << endl;
- cout << "x + y = " << x + y << endl;
- cout << "x - y = " << x - y << endl;
- cout << "x * y = " << x * y << endl;
- cout << "x / y = " << x / y << endl;
- cout << "x % y = " << x % y << endl;
- system("pause");
- return 0 ; //回傳主控台
- }
複製代碼 |