- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int x;
- cout<<"please enter a whole number:";
- cin>>x;
-
- int y;
- cout<<"please enter a whole number:";
- cin>>y;
-
- cout<<"when x's value is "<<x<<",y's value is"<<y<<"when..."<<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;
- }
複製代碼 |