Pagini recente » Cod sursa (job #2941136) | Cod sursa (job #232311) | Cod sursa (job #1450351) | Cod sursa (job #2245457) | Cod sursa (job #1131095)
#include <cstdio>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int ok=0;
unsigned long long total=0,cuvinte=0;
char x;
while(x!='\n')
{
scanf("%c",&x);
if(x=='\n') break;
else
{
if((x>='A'&&x<='Z')||(x>='a'&&x<='z'))
{
total++;
ok=1;
}
else if(ok==1) {cuvinte++;ok=0;}
}
}
if(total==0||cuvinte==0) printf("0");
else printf("%llu",total/cuvinte);
}