Cod sursa(job #2082250)
| Utilizator | Data | 5 decembrie 2017 21:22:04 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char s[1000001];
char* point;
char* v[10001];
int i, med;
int main()
{
cin.getline(s,1000001);
point = strtok(s," ,.123456789:;'-");
while(point)
{
v[++i]=point;
med+=strlen(v[i]);
point=strtok(NULL," ,.123456789:;'");
}
cout << med/i << endl;
return 0;
}
