Cod sursa(job #1309484)

Utilizator mantisVraciu Stefan mantis Data 5 ianuarie 2015 19:44:15
Problema Text Scor 50
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int lmax,nr=1;
char c;
int main()
{
    f.get(c);
    while(!f.eof())
    {
        if((c>='a' && c<='z')||(c>='A' &&c<='Z'))
            lmax++;
        if(c==' ')
            nr++;
        f.get(c);
    }
    g<<lmax/nr;
    g.close();
    return 0;
}