Cod sursa(job #2123612)

Utilizator AndreiG23Ghiurcuta Andrei AndreiG23 Data 6 februarie 2018 14:06:55
Problema Text Scor 70
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");

int i,S=0,k=0;
bool ok=true;
int main()
{   char s;
        while(fin.get(s))
    {
        if((s>='A'&&s<='Z')||(s>='a'&&s<='z'))
        {
            S++;
            if(!ok)
            {
                ok=true;
                k++;
            }
        }
        else ok=false;

    }
    fout<<S/k;
}