Cod sursa(job #2750864)

Utilizator mateilazarescumateilazarescu mateilazarescu Data 13 mai 2021 14:27:10
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.42 kb
#include<fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
    char c;
    bool ok=true;
    int w=0,l=0;
    while(fin.get(c))
    {
        if((c>='a' and c<='z') or(c>='A' and c<='Z'))
        {
            if(ok)
                w++;
            ok=false;
            l++;
        }
        else
            ok=true;
    }
    fout<<l/w;
    return 0;
}