C语言大小写转换问题

题目要求:

代码实现:

1
2
3
4
5
6
7
8
9
10
11
12
13
#include<stdio.h>
#include<ctype.h>
#include<string.h>
int main() {
int i = 0;
char Str[100] = {0};
gets_s(Str); // 如要通过oj点这里改成gets
int ArrayLen = strlen(Str);
for (int i = 0; i < ArrayLen; i++) {
putchar(tolower(Str[i])); //转换小写并输出到对应的每一个i
}
return 0;
}

C语言大小写转换问题
http://example.com/2023/08/26/C语言大小写转换问题/
Author
fwlw
Posted on
August 26, 2023
Licensed under