int x;// variable declared as an integer variable x = 100;// 'x' now contains the value 100 x +=50;// 'x' now contains the value 150 我是c++初学者.
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 04:45:12
![int x;// variable declared as an integer variable x = 100;// 'x' now contains the value 100 x +=50;// 'x' now contains the value 150 我是c++初学者.](/uploads/image/z/5928191-71-1.jpg?t=int+x%3B%2F%2F+variable+declared+as+an+integer+variable+x+%3D+100%3B%2F%2F+%27x%27+now+contains+the+value+100+x+%2B%3D50%3B%2F%2F+%27x%27+now+contains+the+value+150+%E6%88%91%E6%98%AFc%2B%2B%E5%88%9D%E5%AD%A6%E8%80%85.)
int x;// variable declared as an integer variable x = 100;// 'x' now contains the value 100 x +=50;// 'x' now contains the value 150 我是c++初学者.
int x;// variable declared as an integer variable
x = 100;// 'x' now contains the value 100
x +=50;// 'x' now contains the value 150
我是c++初学者.
int x;// variable declared as an integer variable x = 100;// 'x' now contains the value 100 x +=50;// 'x' now contains the value 150 我是c++初学者.
int x;定义一个整数变量
x=100;//将100值赋给予x
x+=50;即是x=x+50 =>x=100+50 => x=150
注:在C语言中“=”并不是和传统数学的等号,而是赋值符,即将右边的表达式计算结果放在左边的变理里.