Pagini recente » Monitorul de evaluare | Borderou de evaluare (job #398640) | Borderou de evaluare (job #312909) | Cod sursa (job #34620) | Cod sursa (job #178107)
Cod sursa(job #178107)
#include<stdio.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int nc=0,nl=0;
char x;
bool ok=false;
scanf("%c",&x);
while(x!='\n')
{
if((x>='A')&&(x<='Z')||(x>='a')&&(x<='z'))
{
nl++;
ok=true;
}
else
{
if(ok)
{
nc++;
ok=false;
}
}
scanf("%c",&x);
}
if(ok)
nc++;
printf("%d\n",nl/nc);
return 0;
}