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/05/04 12:48:20
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;// 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语言中“=”并不是和传统数学的等号,而是赋值符,即将右边的表达式计算结果放在左边的变理里.