Cod sursa(job #2261434)

Utilizator Yoyo1912Ursoiu Ioana Yoyo1912 Data 16 octombrie 2018 11:04:21
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.34 kb
#include <fstream>
#include <cstring>
using namespace std;
char c;
int nrl,nrc,ok;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
    while(!f.eof())
    {
        f.get(c);
        if((c<='z'&&c>='a')||(c<='Z'&&c>='A'))
            {nrl++;ok=1;}
        else if(ok){nrc++;ok=0;}
    }
    g<<(nrl/nrc);
    return 0;
}