Cod sursa(job #1365519)

Utilizator DeehoroEjkoliPop Darian DeehoroEjkoli Data 28 februarie 2015 12:39:10
Problema Text Scor 70
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
string v;
int p,s,k,i;
int main()
{
    while (f>>v)
    {
        for (i=0;i<=v.length()-1;i++)
            if ((v[i]<'A')||(v[i]>'z')||(v[i]>'Z'&&v[i]<'a'))
            k++;
        s=s+v.length()-k;
        p++; k=0;
    }
    g<<s/p;
    return 0;
}