Cod sursa(job #642207)
Utilizator | Data | 30 noiembrie 2011 18:15:54 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char s[100000],*cuv,v[100000];
int nrcuv,lung;
int main()
{fin.get(s,100000);
cuv=strtok(s," ,.?!-'");
while(cuv)
{
nrcuv++;
strcat(v,cuv);
cuv=strtok(0," ,.?!-'");
}
fout<<(strlen(v)-1)/nrcuv;
return 0;
}