Cod sursa(job #1132440)

Utilizator Eman98Ghinea Mihail Emanuel Eman98 Data 3 martie 2014 12:02:22
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.41 kb
#include<fstream>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
unsigned int nrl,nrc,ok;
char k;
int main()
{
    while(cin.get(k))
    {
        if(ok==0&&((k>='a'&&k<='z')||(k>='A'&&k<='Z')))
            ok=1;
        if(ok==1&&((k>='a'&&k<='z')||(k>='A'&&k<='Z')))
            nrl++;
        else if(ok==1)
        nrc++,ok=0;
    }
    cout<<nrl/nrc;
    return 0;
}