Pagini recente » Cod sursa (job #1816882) | Cod sursa (job #1270924) | Cod sursa (job #2740257) | Cod sursa (job #1383775) | Cod sursa (job #904573)
Cod sursa(job #904573)
#include<stdio.h>
using namespace std;
int nr,l;
void rezolv()
{
char c;
int ok=0;
while(scanf("%c",&c)!=EOF)
{
if(('a'<=c && c<='z') || ('A'<=c && c<='Z'))
{
++l;
ok=1;
}
else
if(ok==1)
{
++nr;
ok=0;
}
}
if(nr==0)
nr=1;
printf("%d",l/nr);
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
rezolv();
fclose(stdin);
fclose(stdout);
return 0;
}