Cod sursa(job #1090950)
Utilizator | Data | 23 ianuarie 2014 12:07:02 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <cstdio>
#include <cctype>
using namespace std;
int nrlit,nrcuv;
char c;
bool ok=false;
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while (scanf("%c",&c)!=EOF)
{
if (isalpha(c))
{
nrlit++;
if (!ok)
{
nrcuv++;
ok=true;
}
}
else ok=false;
}
printf("%d",nrlit/nrcuv);
return 0;
}