#include<stdio.h> int main() { //课前拓展 int a=3; int b=3; printf("%d ",b=a*a++); //a*a++ >> {a++>>i=a; } printf("%d",b=b*a++); 结果:12 9 // #运算符 #三目运算符(判断表达式)?<返回值1>:<返回值2>先判断后选择(表达式为true返回值1,else返回值2) #逗号运算符( , , ) 从左往右计算:https://zhidao.baidu.com/question/24386745.html; #循环控制+分支控制+goto标签 { #while ,do while,for { while(){}/先循环后判断//注意:while不能套while 例子:/************** int a=0; while(1) { printf("%d ",a++); sleep(1) } 结果:0 1 2 3 //每隔一秒加1,不断向下加 ***************/ do{}while();/先执行do以后的语句再判断 例子:/*************** int a=0; do{ printf("%d",a); } while(a<-5); 结果:0 ***************/ for(){}/和while相同先判断后执行 //用for i=0;要执行次则i<n } #if else #goto标签 { goto logo; int a=10; printf(""); logo; printf(""); } #continue; } }