标签:
Description
Input
Output
Sample Input
Sample Output
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main() { #ifdef CDZSC_OFFLINE freopen("in.txt","r",stdin); #endif char str[15],s[1024]; char a[27]="VWXYZABCDEFGHIJKLMNOPQRSTU"; int len,i; while(scanf("%s",str)) { if(strcmp(str,"ENDOFINPUT")==0) { break; } getchar(); cin.getline(s,1024); scanf("%s",str); len=strlen(s); for(i=0; i<len; i++) { if(s[i]>=‘A‘&&s[i]<=‘Z‘) { printf("%c",a[s[i]-‘A‘]); } else { printf("%c",s[i]); } } printf("\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/Wing0624/p/4243829.html