Cod sursa(job #2308102)

Utilizator cosceexcosceex cosceex Data 26 decembrie 2018 13:44:02
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.37 kb
#include <bits/stdc++.h>

using namespace std;

ifstream f("text.in");
ofstream g("text.out");
char c;

long long n,x;
int main()
{
    while(f>>noskipws>>c)
    {
        if(isalpha(c))
           n++;
        while(isalpha(c))
            x++ , f>>noskipws>>c;
    }

    g<<x/n;
    //for(int i=1;i<=n;i++)
    //    g<<a[i]<<'\n';
    return 0;
}