Cod sursa(job #2450779)
Utilizator | Data | 24 august 2019 16:07:59 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
long long lc = 0, nc = 0 , k = 0;
char c;
bool ok = 0;
void citire()
{
while(fin.get(c))
{
if(c>='A'&&c<='z')
{
ok = 1;
lc++;
}
else if(ok==1)
{
ok = 0;
nc++;
}
}
}
void afisare()
{
fout << lc/nc;
}
int main()
{
citire();
afisare();
return 0;
}