#include <iostream>
using namespace std;
int main()
{
//加减乘除
int a1 = 300;
int b1 = 3;
cout << a1 + b1 << endl;
cout << a1 - b1 << endl;
cout << a1 * b1 << endl;
cout << a1 / b1 << endl;
cout << a1 % b1 << endl;
int a2 = 10;
int b2 = 20;
cout << a2 / b2 << endl;
//int a3 = 10;
//int b3 = 0;
//cout << a3 / b3 << endl;
double d1 = 0.5;
double d2 = 0.22;
cout << d1 / d2 << endl;
}
注:%为取余运算,可以得出小数。double为双精度浮点型