Cod sursa(job #2294675)

Utilizator carol800Dima Carol Valentin carol800 Data 2 decembrie 2018 17:48:51
Problema Text Scor 60
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int suma, n, m, s, ct, ok;
int main()
{
    char a;
    fin.get(a);
    while(!fin.eof())
    {
        if (a>='a'&&a<='z')
        {
            s++;
            ok=1;
        }
        else if (ok==1)
        {
            ok=0;
            ct++;
        }
        fin.get(a);
    }
    if (ok==1)
    {
        ct++;
    }
    fout<<s/ct;
}