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 |
AC后的代码,给大家参考一下!#include <stdio.h> #include <ctype.h> #include <string.h> #define SIZE 512 int main(void) { int i = 0; char s[SIZE]; while(gets(s) && strcmp(s, "ENDOFINPUT")) { if(! strcmp(s, "START") || ! strcmp(s, "END")) continue; for(i = 0; s[i] != 0 && i < SIZE; ++i) { if (! isupper(s[i])) continue; s[i] -= 5; if (s[i] < 'A') s[i] += 26; } printf("%s\n", s); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator