Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
水水更健康!#include <stdio.h> #include <string.h> char s[50],t[50]; char st[1000]; char find(char c) { if(c>='A'&&c<='Z') { c-=5; if(c<'A') { c+=26; } } return c; } int main() { int i; while(gets(s)!=NULL) { if(s[0]=='E'&&s[1]=='N'&&s[2]=='D'&&s[3]=='O'&&s[4]=='F'&&s[5]=='I'&&s[6]=='N'&&s[7]=='P'&&s[8]=='U'&&s[9]=='T') { break; } else { gets(st); for(i=0; i<strlen(st); i++) { st[i]=find(st[i]); } gets(t); puts(st); } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator