Pagini recente » Cod sursa (job #2841653) | Istoria paginii utilizator/flavialice | Istoria paginii utilizator/xellah | Cod sursa (job #165098) | Cod sursa (job #857536)
Cod sursa(job #857536)
#include<stdio.h>
bool islet(char x){
if((x>='a'&&x<='z')||(x>='A'&&x<='Z')){
return true;
}
return false;
}
int main(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char ch,last;
int l=0,c=0;
last='!';
while(scanf("%c",&ch)!=EOF){
if(islet(ch)==true){
++l;
if(islet(last)==false){
++c;
}
}
last=ch;
}
printf("%d\n",(c/l));
return 0;
}