Pagini recente » Cod sursa (job #1201373) | Cod sursa (job #928603) | Cod sursa (job #386555) | Cod sursa (job #2938093) | Cod sursa (job #2213928)
#include<fstream>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
char pars[2000000];
bool elitera(char x)
{
if('a'<=x && x<='z' || 'A'<=x && x<='Z') return 1;
return 0;
}
int main()
{
cin.get(pars,2000000);
int c=0,nrc=0,nrl=0;
for(int i=0;pars[i]!=0;i++)
if(elitera(pars[i]))
{
++nrl;
if(c==0)
{
c=1; ++nrc;
}
}
else c=0;
cout<<nrl/nrc;
}