#include <stdio.h> #include <stdlib.h> #include<math.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { char str[90]; gets(str); int i=0; while(str[i]){ if('a'<=str[i]&&str[i]<='z'||'A'<=str[i]&&str[i]<='Z'){ printf("%c",str[i]); } i++; } } |
Double click to view unformatted code.