Cod sursa(job #1929540)

Utilizator ciocirlanrCiocirlan Robert ciocirlanr Data 17 martie 2017 19:23:38
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <bits/stdc++.h>
using namespace std;
ifstream in("text.in");ofstream out("text.out");
long long S,K;
char c;
bool ok;
int main()
{
    while(in.get(c))
    {
        if(c >= 'a' and c <= 'z' || c >= 'A' and c <= 'Z')
            S++,ok = 1;
        else
            if(ok)
                K++,ok = 0;
    }

    out << S/K;
    in.close();
    out.close();

    return 0;
}