- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
-
- int a;
- cout<<"請輸入一個整數:";
- cin>>a;
- cout<<"4nl4l4"<<a<<endl;
- int b;
- cout<<"請輸入另一個整數:";
- cin>>b;
- cout<<b<<endl;
- int x=a,y=b;
- 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;
- }
複製代碼 |