- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x;
- int y;
- cout<<"請輸入x的值:";
- cin>>x;
- cout<<"請輸入y的值:";
- cin>>y;
- cout<<"你輸入的數字是"<<x<<endl;
- cout<<"你輸入的數字是"<<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;
- }
複製代碼 |