Cod sursa(job #1231377)
Utilizator | Data | 20 septembrie 2014 13:51:37 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include <stdio.h>
#include <stdlib.h>
int main()
{
int len=0,cuv=0,k=0;
char ch;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c", &ch)!=EOF)
{if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{len=len+1;
if(k==0)cuv++;
k=1;}
else k=0;
}
printf("%d",len/cuv);
return 0;
}