Pagini recente » Cod sursa (job #1288294) | Cod sursa (job #1200084) | Cod sursa (job #264628) | Cod sursa (job #2369995) | 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;
}