也就是 sum= sum+n
另外类似的还有
a*=b
a/=b
a%=b
a^=b
a|=b
等等
甚至还可以连续调用,如 a+=b+=c; 在执行过程中,会从右往左计算,即先计算 b+=c 再计算a+=b
例如 设一开始 a=b=c=1; 那么在执行完 a+=b+=c; 后 a=3 b=2 c=1
猜你喜欢
- 1What we have lost somewhere must be found somewhere else.
- 2英语阅读 John sent his mother expensive presents on his mother's birthday every year.
- 3用所给单词的适当形式填空:Gina is a name for a ( )(girl).
- 4试用两种不同的分组方法把多项式x2+xy-3x-3y分解因式.
- 5How was your recent visit to Beijing?It was great
- 6训练时,若干新兵站成一排,从一开始报数,除了甲以外其他人报的数之和减去甲报的数正好是50,问有多少名新兵?
- 7古诗中表达同情百姓疾苦的诗句
- 8since,when,while等引导时间状语从句时 直接引语变间接引语 时态怎样变化?
- 91.盘古为什么要"头顶天,脚踏地" 2.第三段划线句运用了什么修辞手法?其作用是什么?(盘古的身子究竟有多长
- 10玩具作文300字、好的作文