Description
编写程序,输入字符串,将字符串中所有小写字母改为大写字母后输出该字符串。
Input
Output
Sample Input
abc123BNU
Sample Output
ABC123BNU#include <iostream> #include <cstring> #include <string> using namespace std; int main() { char str[101]; int i; gets(str); for(i=0;str[i]!=' ';i++) { if(str[i]>=97&&str[i]<=122) str[i]=str[i]-32; } cout<<str<<endl; return 0; }