Pagini recente » Cod sursa (job #2192292) | Cod sursa (job #1130882) | Cod sursa (job #133751) | Cod sursa (job #207721) | Cod sursa (job #74380)
Cod sursa(job #74380)
#include<stdio.h>
#include<string.h>
#include<ctype.h>
char c; int nr=0,k=0;
void rezolvare(){
int ok=0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
c=getc(stdin);
while(!isalpha(c)&&!feof(stdin))
c=getc(stdin);
while(!feof(stdin)){
ok=0;
if(isalpha(c)){
k++;
c=getc(stdin);
}
else{
ok=1;
while(!isalpha(c)&&!feof(stdin))
c=getc(stdin);
nr++;
}
}
if(ok==0)
nr++;
printf("%d",k/nr);
fclose(stdout);
}
int main(){
rezolvare();
return 0;
}