Cod sursa(job #1090713)
| Utilizator | Data | 22 ianuarie 2014 23:16:59 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.61 kb |
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char s;
int nrlit=0,nrcuv=0,k;
while(scanf("%c",&s)!=EOF)
{
if((s>='a'&&s<='z')||(s>='A'&&s<='Z'))
{
nrlit++;
k=0;
}
else
if(k==0)
{
nrcuv++;
k=1;
}
}
if(nrcuv==0)
printf("0");
else
printf("%d",nrlit/nrcuv);
fclose(stdin);
fclose(stdout);
return 0;
}
