课时2

基本运算符

- +

增量 ++ -- ++i i++区别

换行endl

 分支 if语句

if else的就近配对方式

if{if}

else

switch 语句

switch ()

{

case1statement 1

break

}

循环while 语句

Int 1,sum=0;

while(i<=n)

{

sum=sum+i;

i++;

}

sum+=i  sum=sum+i

 

for循环

for(int i;

i<=n;

I++  )

sum+=i;

 

continue&break

posted @ 2019-07-15 16:43  Cathycat  阅读(109)  评论(0编辑  收藏  举报