#include <stdio.h> #include <math.h> int main() { char a[90]; int i; gets(a); for(i=0;i<90;++i) if(a[i]>='a'&&a[i<='z'||a[i]>='A'&&a[i]<='Z') printf("%c",a[i]); } /* Main.c: In function 'main': Main.c:7:4: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(a); ^ Main.c:9:44: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(a[i]>='a'&&a[i<='z'||a[i]>='A'&&a[i]<='Z') ^ Main.c:9:55: error: expected ']' before ')' token if(a[i]>='a'&&a[i<='z'||a[i]>='A'&&a[i]<='Z') ^ */ |
Double click to view unformatted code.