Cod sursa(job #694751)

Utilizator FayedStratulat Alexandru Fayed Data 27 februarie 2012 23:24:55
Problema Text Scor 60
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include<fstream>
using namespace std;

ifstream f("text.in");
ofstream g("text.out");

char exp;

int main()
{
 int l=0,cuv=0,ok=0;

 while(f.get(exp))
{
    if(exp>='a' && exp<='z' || exp>='a' && exp<='z')
    {
        ok=1; l++;

        }
 else if(ok==1)
{

    cuv++;
ok=0;

    }
    }
g<<l/cuv;
f.close();
g.close();
return 0;
    }