- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x = 1;
- int y = 11;
- cout<<"請快點輸入x的值: ";
- cin>>x;
- cout<<"請快點輸入y的值: ";
- cin>>y;
- 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;
- }
複製代碼 |