Cod sursa(job #488082)

Utilizator paul_gabryelPaul Buda paul_gabryel Data 27 septembrie 2010 17:30:06
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb

#include<fstream>
#include<cstdio>

using namespace std;

int nrc,nrl;
char crt;

int main ()
{

ifstream in ("text.in");
freopen ("text.out","w",stdout);

bool cuv=false;

while(in.get(crt)){
if((crt>='a'&&crt<='z')||(crt>='A'&&crt<='Z'))
    cuv=true,++nrl;
else
    if(cuv)
        ++nrc,cuv=false;
}
if(cuv)
++nrc;

in.close();

printf("%d\n",nrl/nrc);

return 0;}