Pagini recente » Cod sursa (job #2618786) | Cod sursa (job #1273413) | Cod sursa (job #2755996) | Cod sursa (job #2610180) | Cod sursa (job #1276184)
#include <cstdio>
#include <cstring>
using namespace std;
FILE *fin=freopen("text.in","r",stdin);
FILE *fout=freopen("text.out","w",stdout);
char *p, S[10000000], Sep[] = " -!?.,'/><~`@#$%^&*()_+=\}{[];:";
int Len, Nr;
int main()
{
gets(S);
p = strtok(S, Sep);
while( p != NULL )
{
++Nr;
Len += strlen(p);
p = strtok(NULL, Sep);
}
printf("%d", Len / Nr);
return 0;
}