Cod sursa(job #233087)
Utilizator | Data | 16 decembrie 2008 21:02:47 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.9 kb |
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int n,i,k,c,cuv=1,lit=1;
c==0;
char a;
while(scanf("%c",&a)!=EOF)
{ if(isalpha(a)>=1)
{lit++;
if(c==0)
{
// if(strchr('- .,;:"()',a[i]))
cuv++;
c=1;
}
}
if(isalpha(a)==0)
c=0;
}
if(c==0 && isalpha(a)!=0)
cuv++;
printf("%d\n",(lit-1)/(cuv-1));
return 0;
}