#include<iostream>
using namespace std;
int main()
{
int a = 5;
int b = 4;
cout << a + b << endl;
cout << a - b << endl;
cout << a * b << endl;
cout << a / b << endl;//两个整数相除,结果依然为整数,小数被舍去
cout << a % b << endl;//取模运算的实质是求余数5%4=1 4%5=4,取模运算除数不能为0,两个小数不能取模运算
cout << b % a<< endl;
//前置递增
++a;//变量加1
cout << a << endl;
//后置递增
b++;//变量加1;
cout << a << endl;
//区别:前置递增,先+1,后运算,后置递增,先运算再+1;
int c = ++a * 10;
cout << c << endl;//c=70
int d = b++ * 10;
cout<< d << endl;//d=50
cout << (a > b) << endl;
//c++ 0为假,非0即为真
int s = -5;
cout << !s << endl;
system("pause");
return 0;
}