- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x;
- int y;
- cout<<"請輸入第一個數";
- cin>>x;
- cout<<"請輸入第二個數";
- cin>>y;
- 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;
- }
複製代碼 |