Cod sursa(job #1649755)

Utilizator poppaulpop paul poppaul Data 11 martie 2016 14:57:38
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb

#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int c,l,ok,i;

char s;
int main()
{

    while(f.get(s))
        if((s>='a'&&s<='z')||(s>='A'&&s<='Z'))
        {
            l++;
            ok=1;
        }
        else
            if(ok==1){
                c++;
                ok=0;
            }
    if(ok) c++;
    g<<l/c;
    return 0;
}