- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x;
- cin>>x;
- cout<<"當x值為"<<x<<endl;
- int y;
- cin>>y;
- cout<<"當y值為"<<y<<endl;
- 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;
- }
複製代碼 |