Pagini recente » Cod sursa (job #29680) | Cod sursa (job #2457433) | Rating macar am incercat rip (vanghelion2016) | Cod sursa (job #1032247) | Cod sursa (job #855552)
Cod sursa(job #855552)
#include <iostream>
#include<fstream>
#include<string.h>
using namespace std;
fstream f("text.in",ios::in);
fstream g("text.out",ios::out);
char a[20000040],*p;
long long n=0,nr=0;
int main()
{
while(!f.eof())
{
f.get(a,20000000);
p=strtok(a," .,?;:'!@#$%^&*_+=-<>/*(){}][~`�$");
if(!f.eof())
while(p)
{nr++;
n+=strlen(p);
p=strtok(NULL," .,?;:'!@#$%^&*_+=-<>/*(){}][~`�$");
}
}
g<<n/nr;
return 0;
}