Cod sursa(job #827685)

Utilizator costin7856Antonesi Florean Costin costin7856 Data 2 decembrie 2012 14:43:33
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include<fstream>
#include<cstring>
using namespace std;
long long  nr1,nr2;
char a,b;
int main()
{

    ifstream f("text.in");
    ofstream g("text.out");
    while(f.get(a))
    {
        if (a>='a'&&a <='z'||a>='A'&&a<='Z')
        nr1++;
        else
        if(b>='a'&&b<='z'||b>='A'&&b<='Z')
        nr2++;
        b=a;
    }
    g<<nr1/nr2;
}