Cod sursa(job #2437923)

Utilizator onicUrsan Dragos onic Data 10 iulie 2019 18:56:14
Problema Text Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.5 kb
// Example program
#include <iostream>
#include <string.h>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream o("text.out");
int avg,len,wordc;
char c;
int k,p;
bool wrd;
int main()
{word=false;
    while(f.get(c))
    {
        if((c>='a' && c<='z') || (c>='A'&& c<='Z'))
        {
            k++;
            wrd=true;
        }
        else
            if(word)
        {
            word=false;
            p++;
        }

    }
    o<<k/p;
return 0;
}