Cod sursa(job #2134374)
Utilizator | Data | 17 februarie 2018 21:27:01 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int nr,t;
bool ok;
int main()
{
while(fin.get(c))
{
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
if(ok==false){ok=true;nr++;}
t++;
}
else ok=false;
}
fout<<t/nr;
return 0;
}