Cod sursa(job #2394778)

Utilizator richardbaczur1Baczur Richard richardbaczur1 Data 1 aprilie 2019 22:09:39
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.53 kb
#include <bits/stdc++.h>

using namespace std;
int main()
{
    freopen("text.in", "r", stdin);
    freopen("text.out","w", stdout);
    int ok;
    char x;
    unsigned long long cuv=0,lit=0;
    while (!feof(stdin))
    {
        scanf("%c", &x);
        ok=0;
        while ((x>='a' && x<='z') || (x>='A' && x<='Z'))
        {
            lit++;
            scanf("%c", &x);
            ok=1;
        }
        if (ok)
        {
            cuv++;
        }
    }
    printf("%d", lit/cuv);
    return 0;
}