Cod sursa(job #2450783)
Utilizator | Data | 24 august 2019 16:10:21 | |
---|---|---|---|
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')
{
if(ok==0)
nc++;
lc++;
ok = 1;
}
else
ok = 0;
}
}
void afisare()
{
fout << lc/nc;
}
int main()
{
citire();
afisare();
return 0;
}