Cod sursa(job #2609169)

Utilizator XXMihaiXX969Gherghinescu Mihai Andrei XXMihaiXX969 Data 2 mai 2020 11:46:24
Problema Text Scor 100
Compilator cpp-64 Status done
Runda igorj_mentorat1 Marime 0.53 kb
#include <bits/stdc++.h>

using namespace std;




ifstream in("text.in");
ofstream out("text.out");


int main()
{



    int cnt = 0;
    int nrl = 0;
    bool ok = false;

    char s;

    while(in.get(s))
    {

        if((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z'))
        {
            nrl++;
            if(ok == false)
            {
                ok = true;
                cnt++;
            }
        }
        else
        ok = false;

    }
    out << nrl / cnt;
    return 0;
}