Cod sursa(job #1642006)

Utilizator BicuDanBicu Daniel BicuDan Data 9 martie 2016 12:00:22
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <iostream>
#include <cstring>
#include <fstream>
#include <cctype>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char t;
int l,cuv;
bool ok;
int main()
{
    while(fin.get(t))
    {
        if(isalpha(t))
        {
            l++;
            ok=true;
        }
        else
        {
            if(ok)
                cuv++;
            ok=false;
        }
    }

fout<<l/cuv;
return 0;
}