Cod sursa(job #1821587)

Utilizator giotoPopescu Ioan gioto Data 3 decembrie 2016 12:49:04
Problema Text Scor 100
Compilator cpp Status done
Runda x_test2 Marime 0.4 kb
#include <fstream>
std :: ifstream f ("text.in");
std :: ofstream fout ("text.out");
using namespace std;

char x;
int C, L;
int main()
{
    while(f.get(x)){
        if((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z'))
            ++C;
        while((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z')){
            ++L;
            f.get(x);
        }
    }
    fout << L / C;
    return 0;
}