Cod sursa(job #1732847)
Utilizator | Data | 22 iulie 2016 18:24:51 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <cstdio>
#include <cctype>
#include <cstring>
using namespace std;
int nrcuv,len,ok;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char c;
while( !feof(stdin) )
{
scanf("%c",&c);
if(isalpha(c)) { len++; ok=1; }
else
if(ok)
{
nrcuv++; ok=0;
}
}
printf("%d",len/nrcuv);
return 0;
}