Cod sursa(job #2474738)

Utilizator Andy_ANDYSlatinaru Andrei Alexandru Andy_ANDY Data 15 octombrie 2019 19:35:34
Problema Text Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ifstream f ("text.in"); ofstream g ("text.out");

int main()
{   ios_base::sync_with_stdio(0);
    cin.tie(0);
    string s;
    int nrcuv=0,nrl=0;
    while(f>>s)
    {   nrcuv++;
        for(int i=0;i<s.size();i++)
            if('a'<=s[i] and s[i]<='z' || 'A'<=s[i] and s[i]<='Z')
                nrl++;
    }
    cout<<nrl/nrcuv;
    return 0;
}