把字符串中的大写字母换成小写输出
这样写:
#include<iostream>
#include<cctype>
#include<cstring>
using namespace std;
int main()
{
char s[1010];
while(gets(s))
{
int i=-1;
while(s[++i])
putchar(tolower(s[i]));
cout<<endl;
}
}
把字符串中的大写字母换成小写输出
这样写:
#include<iostream>
#include<cctype>
#include<cstring>
using namespace std;
int main()
{
char s[1010];
while(gets(s))
{
int i=-1;
while(s[++i])
putchar(tolower(s[i]));
cout<<endl;
}
}