本帖最後由 曲書辰 於 2018-10-13 14:01 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int X,Y;
- cout<<"請輸入X的值:";
- cin>>X;
- cout<<"請輸入Y的值:";
- cin>>Y ;
- 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;
-
- }
複製代碼 |