#include<stdio.h> #include<string.h> #include<ctype.h> int main() { char str[256]; int i,k=0,n; gets (str); n=strlen(str); for(i=0;i<n;i++) if (tolower(str[i])>='a' && tolower(str[i])<='z') { str[k]=str[i];k++; } str[k]='\0'; printf("%s\n",str); return 0; } |
Double click to view unformatted code.