#include <stdio.h>int main(void){ char s[128]; int i = 0, sum = 0; printf("please input a string\n"); while (1) { scanf("%c", &s[i]); if ('\n' == s[i]) break; i++; } for (i = 0; s[i]; i++) { if (s[i] >= 'a' && s[i] <= 'z') { printf("%c ", s[i]); sum++; } } printf("\nthe count of lower letter is %d\n", sum); return 0;}
#include"stdio.h" main(){ char s[]; int i,k=0; gets(s); for(i=0;s[i];i++) if(s[i]>='a'&&s[i]<='z') { k++; printf("%c",s[i]); } printf("\nlowercount=%d\n",k); getchar();}
#include <stdio.h>main(){ int ch,i=0; while((ch=getchar())!='\n') if(ch>='a'&&ch<='z'&&++i) putchar(ch); printf("\n\tcount:%d\n",i);}
#include <stdio.h>void main(){ char s[81]; int i,k=0; gets(s); for(i=0;s[i];i++) if(s[i]>='a'&&s[i]<='z') { k++; printf("%c",s[i]); } printf("\nlowercount=%d\n",k);}