Cod sursa(job #1106086)

Utilizator StanAndreiAndrei Stan StanAndrei Data 12 februarie 2014 14:47:35
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.59 kb
#include <stdio.h>
#include <string.h>

using namespace std;

int LEN,NRLIT,NRCUV;

int main()
{
    freopen ("text.in","r",stdin);
    freopen ("text.out","w",stdout);

    int i,ok=0;
    char c;
    while (!feof(stdin))
    {
        scanf("%c",&c);
        if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
        {
            NRLIT++;
            if (!ok)
            {
                NRCUV++;
                ok=1;
            }
        }
        else
            ok=0;
    }

    printf("%ld\n",NRLIT/NRCUV);

    fclose(stdin);
    fclose(stdout);
    return 0;
}