- #include<iostream> //input&output stream
- #include<cstdlib>//c standard library
- using namespace std ;//使用命名空間 std
- int main()
- {
- int x=10,y=3;
- 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;
- }
複製代碼 |