Cod sursa(job #2294662)

Utilizator carol800Dima Carol Valentin carol800 Data 2 decembrie 2018 17:40:23
Problema Text Scor 60
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.4 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;
    while(!fin.eof())
    {
        fin.get(a);
        if (a>='a'&&a<='z')
        {
            s++;
            ok=1;
        }
        else if (ok==1)
        {
            ok=0;
            ct++;
        }
    }
    fout<<s/ct;
}