#include<stdio.h> #include<string.h> int main() { char str[101]; scanf("%s",str); int i; char c; //A-Z 65-90 //a-z 97-122 for(i=0;(c=str[i])!='\0';i++) { if(str[i]<=122&&str[i]>=97) str[i] = str[i]-32; } printf("%s",str); return 0; }
标签:转换,int,C语言,char,大小写,str,include,97 From: https://www.cnblogs.com/kmxojer/p/16719785.html