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 |
Re:AC后的代码,给大家参考一下!In Reply To:AC后的代码,给大家参考一下! Posted by:microQ at 2008-11-24 14:10:38 > #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; > } if(str[i]>='A'&&str[i]<='Z') { cout<<(char)(90-(95-(int)str[i])%26); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator