'a' ---> 97
'A' ---> 65
#include <stdio.h>
int main()
{
char a[] = "Hello World!";
int i = 0;
while(a[i] != '\0')
{
if(a[i] >= 'a' && a[i] <= 'z')
{
a[i] -= 32;
}
i++;
}
printf("%s\n", a);
}
标签:---,小写字母,char,int,World,Hello
来源: https://www.cnblogs.com/wmt657/p/15814977.html