Cod sursa(job #2294686)
Utilizator | Data | 2 decembrie 2018 17:59:47 | |
---|---|---|---|
Problema | Text | Scor | 60 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int suma, n, m, s, ct, ok;
int main()
{
char a;
fin.get(a);
while(!fin.eof())
{
cout<<a;
if (a>='a'&&a<='z')
{
s++;
if (ok==0) ct++;
ok=1;
}
else if (ok==1)
{
ok=0;
}
fin.get(a);
}
fout<<int(s/ct);
}