Cod sursa(job #476517)

Utilizator Snavenportnespecificat Snavenport Data 11 august 2010 13:24:57
Problema Text Scor 70
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <fstream>
#include <string.h>

using namespace std;

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

char x,sir[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main()
{
    long nr=0,nrcuv=0,i=1;
    while (!f.eof())
    {
        f.get(x);
        if (strchr(sir,x))
          {
              while (strchr(sir,x))
               {
                   nr++;
                   f.get(x);
               }
               nrcuv++;
          }



    }
    g<<nr/nrcuv;

    return 0;
}