#include <stdio.h> int main() { char s[90]; scanf("%s", s); int len = strlen(s); int i,j=0; for (i = 0; i < len; i++) { if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) { s[j] = s[i]; j++; } else continue; } for (i = 0; i < j; i++) printf("%c", s[i]); printf("\n"); return 0; } |
Double click to view unformatted code.