- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int x;
- int y;
- x = 81;
- y = 95;
- cout<<"目前x為:"<<x<<endl;
- 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;
- }
複製代碼 |