Pagini recente » Borderou de evaluare (job #1454496) | Cod sursa (job #1410450) | Diferente pentru utilizator/vman intre reviziile 35 si 82 | Monitorul de evaluare | Cod sursa (job #1988638)
#include <iostream>
#include <fstream>
#include <cstring>
#define M 1000000
using namespace std;
int main()
{
char s[M], *p;
int cuv = 0, x = 1;
ifstream f("text.in");
ofstream g("text.out");
f.get(s, M);
p = strtok(s, " ,.!?;");
while(p)
{
cuv += strlen(p);
p = strtok(NULL, " ,.!?;");
x++;
}
g << cuv/x;
return 0;
}