Cod sursa(job #1662825)

Utilizator ACM.Adascalitei Mihai ACM. Data 25 martie 2016 09:48:24
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <iostream>
#include<string.h>
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{char x;
    int k=0,nr_cuv=0,lung=0;
    while (f.get(x))
    { if(isalpha(x))
        {
            if(k==0)
                nr_cuv++;
            k++;
            lung++;
        }
        else
            k=0;

    }
    g<<lung/nr_cuv;
    }