Pagini recente » Cod sursa (job #565509) | Cod sursa (job #897126) | Cod sursa (job #300697) | Cod sursa (job #2663588) | Cod sursa (job #380450)
Cod sursa(job #380450)
#include<cstdio>
#include<cstdlib>
using namespace std;
#define FIN "text.in"
#define FOUT "text.out"
int main()
{freopen(FIN,"r",stdin);
freopen(FOUT,"w",stdout);
char c;
int contor=0,lg=0,curent=0;
scanf("%c",&c);
while(c!='\n')
{if(('a'<=c && c<='z')||('A'<=c && c<='Z'))
{lg++;
if(curent==0) curent=1;
}
else {if(curent==1) {curent=0;contor++;}
}
scanf("%c",&c);
}
printf("%d",lg/contor);
return 0;}