Pagini recente » Cod sursa (job #2249984) | Cod sursa (job #341740) | Rating Never Roll (NarTooN) | Cod sursa (job #438540) | Cod sursa (job #2419049)
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char s[1000001],*p,sep[]=" ,-,.,!,?";
int n,k;
void Citire()
{
f.get(s,100001);
f.get();
p=strtok(s,sep);
while(p)
{
n+=strlen(p);
k++;
p=strtok(0,sep);
}
//g<<s;
g<<n/k;
}
int main()
{Citire();
cout << "Hello world!" << endl;
return 0;
}