Pagini recente » Borderou de evaluare (job #1570459) | Borderou de evaluare (job #1278848) | Borderou de evaluare (job #2400130) | Cod sursa (job #2248671) | Cod sursa (job #2201000)
#include <bits/stdc++.h>
using namespace std;
char text[300009];
int nr,nrc;
bool vf;
int main()
{
ifstream fin ("text.in");
ofstream fout ("text.out");
while (fin>>text)
{
for (int i=0;i<strlen(text);++i)
{
if (isalpha(text[i]))
{
nr++;
vf=1;
}
else
{
if (vf)
{
nrc++;
vf=0;
}
}
}
if (vf)
{
nrc++;
vf=0;
}
}
fout<<nr/nrc;
}