题解 | #大小写转换#
大小写转换
https://www.nowcoder.com/practice/4e089ee8966a4ed4b306f64e68d45264
#include <stdio.h> int main(){ int a=0; while((a=getchar())!=EOF) {getchar(); a=putchar(a+32); printf("\n"); } return 0; }
getchar函数意思是将外部输入的符号转化为assi码
putchar的意思是将assi值转化为符号
大小写assi码差32个
eof常量标志着文件末尾,上述代码标志着读到了末尾,返回,不再进行循环