Pagini recente » Cod sursa (job #1003249) | Cod sursa (job #1903817) | Cod sursa (job #2737467) | Cod sursa (job #480949) | Cod sursa (job #1131100)
#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++;
if(ok==0) cuvinte++;
ok=1;
}
else ok=0;
}
}
if(total==0||cuvinte==0) printf("0");
else printf("%llu",total/cuvinte);
}