题解 P5733 【【深基6.例1】自动修正】
ShineEternal
2019-12-21 21:05:44
循环判断是小写字母就改成大写,其他正常输出
```cpp
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
char s[105];
scanf("%s",s);
for(int i=0;i<strlen(s);i++)
{
if(s[i]>='a'&&s[i]<='z')
printf("%c",s[i]-'a'+'A');
else
printf("%c",s[i]);
}
return 0;
}
```