运算符
运算符的分类
- 算术运算符
- 关系运算符
- 逻辑运算符
- 位运算符
- 赋值运算符
- 杂项运算符
算术运算符
#include<stdio.h>
int main(void)
{
// 算术运算符
int number_a = 10;
int number_b = 20;
// 加
int sum = number_a + number_b;
// 减
int reduce = number_a - number_b;
// ………………
printf("sum = %d\n" , sum);
printf("reduce = %d\n" , reduce);
return 0;
}
运算结果
sum = 30
reduce = -10
位运算符
逻辑运算符
关系运算符
赋值运算符
标签:int,sum,reduce,number,运算符,算术 From: https://www.cnblogs.com/NorthFot/p/16660660.html以上笔记内容来源于 B 站: Micro_Frank