Cod sursa(job #2420982)

Utilizator tryharderulbrebenel mihnea stefan tryharderul Data 13 mai 2019 18:48:04
Problema Text Scor 100
Compilator c-64 Status done
Runda Arhiva de probleme Marime 0.54 kb
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
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;
}