Cod sursa(job #2071794)

Utilizator tiberiu392Tiberiu Ungurianu tiberiu392 Data 21 noiembrie 2017 00:06:19
Problema Text Scor 30
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include<fstream>
#include<cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");

char b;
int s=0,n,i,x,ant=0;

int main()
{

 while(f.get(b))
        {
        f.get(b);
      x=int(b);
        if(x>=65&&x<=90||x>=97&&x<=122)
            {
            if(ant==0)
                {
                ant++;
                s++;
                }
            n++;
            }
        else
            ant=0;


        }

    g<<n/s;
    return 0;
    }