Cod sursa(job #791292)

Utilizator monica11Szekely Monica monica11 Data 23 septembrie 2012 18:16:48
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.43 kb
#include<fstream>
#include<cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char x;
int ok,nrcuv,bt;
int main()
{
    x=f.get();
    while(!f.eof())
    {
        if((x>='a'&&x<='z')||(x>='A'&&x<='Z'))
        {
            ok=0;
            bt++;
        }
        else
        ok++;
        if(ok==1&&bt!=0)
        nrcuv++;
        x=f.get();
    }
   g<<bt/nrcuv;
    return 0;
}