Cod sursa(job #2002094)
| Utilizator | Data | 18 iulie 2017 17:02:10 | |
|---|---|---|---|
| Problema | Text | Scor | 50 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <cstdio>
#include <cctype>
using namespace std;
int main()
{
char ch;
int nrlit = 0, nrcuv = 0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
scanf("%c", &ch);
while(ch != EOF && ch != '\n') {
if(isalpha(ch)) {
++nrcuv;
while(isalpha(ch)) {
scanf("%c", &ch);
++nrlit;
}
}
scanf("%c", &ch);
}
printf("%d\n", nrlit / nrcuv);
return 0;
}
