1.函数getchar():对字符进行输入
ch=getchar()等效于scanf(“%c”,ch)
putchar(ch):对字符进行输出,等效于printf(“%c”,ch)
符合条件时返回值为真
3.多重选择 else if
可使用if
else if
else if
else if
如果没有大括号,else与最近的一个if匹配
4使用头文件stdbool.h可以用bool代替-Bool(长度为1),用true和false代替1,0
1.函数getchar():对字符进行输入
ch=getchar()等效于scanf(“%c”,ch)
putchar(ch):对字符进行输出,等效于printf(“%c”,ch)
符合条件时返回值为真
3.多重选择 else if
可使用if
else if
else if
else if
如果没有大括号,else与最近的一个if匹配
4使用头文件stdbool.h可以用bool代替-Bool(长度为1),用true和false代替1,0