Cod sursa(job #2059622)
| Utilizator | Data | 7 noiembrie 2017 11:40:44 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char Cuv[100000],Sep[]=" ,.<>/?;:'[{]}\|=+-_)(*&^%$#@!`~\n",*coovant;int nrlit=0,nrcuv=0;
fin.get(Cuv,100000);
coovant=strtok(Cuv,Sep);
while(coovant!=NULL)
{
nrlit+=strlen(coovant),nrcuv++;
coovant=strtok(NULL,Sep);
}
fout<<nrlit/nrcuv;
return 0;
}
