Cod sursa(job #2294648)

Utilizator carol800Dima Carol Valentin carol800 Data 2 decembrie 2018 17:26:38
Problema Text Scor 30
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <bits/stdc++.h>
using namespace std;
int suma, n, m, s, ct, ok;
int main()
{
    freopen("text.in", "r", stdin);
    freopen("text.out", "w", stdout);
    char a[2000];
    cin.get(a, 2000);
    cin.get();
    for (int i=0; i<strlen(a); i++)
    {
        if (a[i]>='a'&&a[i]<='z')
        {
            s++;
            ok=1;
        }
        else if (ok==1)
        {
            ok=0;
            ct++;
        }
    }
    cout<<floor(s/ct);
}