Cod sursa(job #694753)

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

int main()
{

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

char exp;

 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;
    }