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