Cod sursa(job #1801754)

Utilizator AlexDragneAlex Dragne AlexDragne Data 9 noiembrie 2016 16:39:45
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream fin("text.in");
ofstream fout("text.out");

char k;
int cl,cc,ok;
int main()
{
    while(fin.get(k))
    {
        if((k>='A' && k<='Z') || (k>='a' && k<='z'))
            cl++, ok=1;
        else
        {
            if(ok==1)
                cc++;
            ok=0;
        }
    }
    fout<<cl/cc;
    fin.close();
    fout.close();
    return 0;
}