Pagini recente » Cod sursa (job #730840) | Cod sursa (job #560091) | Cod sursa (job #2777072) | Cod sursa (job #1567720) | Cod sursa (job #2134840)
#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
#endif
}
char sep[] = " .,;:!?-/&^%$#@)(_`'";
int main() {
Boost();
char text[1010];
cin.getline(text, 1010);
char *p = strtok(text, sep);
int nrCuvinte = 0, nrLitere = 0;
while(p) {
nrCuvinte++;
nrLitere += strlen(p);
p = strtok(NULL, sep);
}
cout << (int)(nrLitere / nrCuvinte);
return 0;
}