Pagini recente » Cod sursa (job #622004) | Cod sursa (job #507612) | Cod sursa (job #506067) | Cod sursa (job #1033634) | Cod sursa (job #1033281)
#include <stdio.h>
#include <string.h>
#define fr(i,a,b) for(int i=a;i<b;++i)
char c;
bool abc(){return ((c>='a'&&c<='z')||(c>='A'&&c<='Z'));};
int main(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int tot=0,w=0;
bool in=false;
while(!feof(stdin)){
scanf("%c",&c);
if(!in) {if(abc()) in=true,++w,++tot;}
else if(abc()) ++tot;
else in=false;
}
printf("%i",tot/w);
return 0;
}