Cod sursa(job #2466689)

Utilizator cristian51090Oanta Cristian cristian51090 Data 2 octombrie 2019 19:55:46
Problema Text Scor 70
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <bits/stdc++.h>
using namespace std;
int main(){
ifstream fin("text.in");
long long cuvinte=0,litere=0;
string x;
bool z;
while(fin>>x){
    z=false;
    for(auto i : x)
        if(isalpha(i))
            {
            litere++;
            z=true;
            }
        if(z)
    cuvinte++;
}
ofstream fout("text.out");
fout << litere/cuvinte;
return 0;
}