#includeusing namespace std; int main() { //加法先入门,其他格式与加法都一致 int a1 = 10; int b1 = 3; int c1 = 0; c1 = b1 + a1; cout <<"c1(a1+b1的值是) " << c1 << endl; //1.前置递增 int a = 12; ++a; //让a+1 cout << "a=" << a << endl; //2.后置递增 int b = 12; b++; //让b+1 cout << "b=" << b << endl; //前置和后置区别:前置递增先让变量+1在进行表达式的运算 //后置递增先进行表达式的计算在+1 //for example //前置 int c = 10; int d = ++c * 10; cout << "c=" << c << endl; cout << "d=" << d << endl; //后置 int e = 10; int f = e++ * 10; cout << "e=" << e << endl; cout << "f=" << f << endl; system("pause"); return 0; }



