Cod sursa(job #1152312)

Utilizator ionut98Bejenariu Ionut Daniel ionut98 Data 24 martie 2014 17:31:49
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include<fstream>
#include<cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int nr,con;
char x,y='-';
int main()
{
    while(!f.eof())
    {
        f.get(x);
        if(x>='a'&&x<='z'||x>='A'&&x<='Z')
        nr++;
        else if(y>='a'&&y<='z'||y>='A'&&y<='Z')
        con++;
        y=x;
    }
    g<<nr/con;
    return 0;
}