大写改小写

#include<iostream>
using namespace std;


int main(){
char text[1000];
int len = 0;
gets(text);
for(int i = 0; i<strlen(text);i++){
if(text[i]<= 'z' && text[i] >= 'a'){
text[i] -= 32;
}
cout<<text[i];
}
system("pause");
return 0;
}

猜你喜欢

转载自www.cnblogs.com/paradis/p/9655484.html