Cod sursa(job #514936)
Utilizator | Data | 19 decembrie 2010 21:37:40 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<stdio.h>
#include<string.h>
long i,r;
char s[1000];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
for (i=0;i<=strlen(s);i++)
if (s[i]==' '&&s[i+1]!=' ')
r++;
printf("%ld",strlen(s)/r);
}