- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- // + - * / %
- int x;
- int y;
- x = 100;
- y = 1;
- cout <<" x現在是 "<<" y現在是 "<< x <<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;
-
- }
複製代碼 |