Pagini recente » Rating Cerchez Dragos Georgian (dragoscerchez) | Istoria paginii utilizator/stigma | Cod sursa (job #1579026) | Cod sursa (job #750275) | Cod sursa (job #1986619)
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char t[1000000],* p,sep[]=" `~!@#$%^&*()_-+={}[]\|;:'""<,.>?/";
int nr=0,s=0;
f.get(t,1000000);
p=strtok(t,sep);
while(p!=NULL)
{
nr++;
s+=strlen(p);
p=strtok(NULL,sep);
}
g<<s/nr<<'\n';
return 0;
}