Pagini recente » Cod sursa (job #2022970) | Cod sursa (job #195384) | Cod sursa (job #2822303) | Diferente pentru problema/xcopy intre reviziile 27 si 17 | Cod sursa (job #2200472)
#include <iostream>
#include <fstream>
#include <cctype>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout ("text.out");
int main()
{
char s[4000], *p;
int c=0,l=0;
cin.getline(s,4000);
p = strtok(s," ,-;?:!");
while(p!=NULL)
{
l=l+strlen(p);
c++;
p=strtok(NULL," ,-;?:!");
}
cout<<l/c;
return 0;
}