Cod sursa(job #3212897)

Utilizator EneAndresEneAndresIoan EneAndres Data 12 martie 2024 11:47:34
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.3 kb
#include<fstream>
using namespace std;
ifstream f("text.in");
int w,l;
bool y;
char c;
int main()
{
    while(f.get(c))
        if(isalpha(c)) {
            if(!y)
                y=1,++w;
            ++l;
        } else
            y=0;
    ofstream("text.out")<<l/w;
    return 0;
}