Cod sursa(job #2274135)

Utilizator NinjaCubeMihai Radovici NinjaCube Data 1 noiembrie 2018 14:08:13
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <bits/stdc++.h>
using namespace std;

int main()
{
    ifstream fin ("text.in");
    ofstream fout ("text.out");
    char c;
    long k,cuv,l;
    l=0;
    k=0;
    cuv=0;
    while(fin.get(c))
    {

        if(isalpha(c))
        {
            l++;
            k++;
            if(k==1)
                cuv++;
        }
        else k=0;
    }
    if(cuv!=0)
        fout<<l/cuv<<"\n";
    else fout<<"0"<<"\n";
    return 0;
}