Cod sursa(job #2484812)

Utilizator AndreiStrAndrei Stroici AndreiStr Data 31 octombrie 2019 17:12:11
Problema Text Scor 30
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.48 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int nr,nrcv,i;
char af[60]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
string s;

int main()
{
    getline(f,s);
    while(!strchr(af,s[i]))
        i++;
    while(s[i])
    {
        int j=i;
        while(strchr(af,s[j]))
        {
            j++;
            nr++;
        }
        nrcv++;
        i=j;
        i++;
    }
    g<<nr/nrcv;
    return 0;
}