变量名称
变量(盛饭的碗,一个有名字的碗,一个空的碗,可以盛上饭,可以盛不同的饭,就是赋值不同的数值)
int a;a = 5;int b = 2;int c, d, e, f;
// n个数int n;// 一个数int n;int x;// 两个数int a, b;int x, y;// 求和int sum;// 计数int cnt;// 写循环, i, j, kfor (int i = 0; i < n; i++)for (int j = 0; j < m; j++)for (int k = 0; k < p; k++)// 如果有更多层的循环,i1, i2, i3, i4// 开数组const int N = 110;int a[N];const int N = 1e5 + 10;int a[N];// n行,m列的矩阵int n, m;// 坐标int x, y;// 和生活中的一些事物,有关联// 钱,时间,距离int money, int tim, int disint d;// 临时变量,存一些中间信息int temp;int t;// 有n组数据int T;while (T--){}// 奥义// 英文单词简写(缩写)
标准数据类型
// 以下几个单词,要记笔记int, 整型,用来存整数double, 双精度浮点型,用来存小数/实数char, 字符类型,用来存字符bool, 布尔类型,用来存true/falselong long, 长整型,用来存爆int的数,1e18这个量级的string, string类,用来存字符串的// 其他不常用的:short, 短整型float, 单精度浮点数
