Pagini recente » Cod sursa (job #640388) | Cod sursa (job #2247462) | Borderou de evaluare (job #1926373) | Cod sursa (job #2646802) | Cod sursa (job #642852)
Cod sursa(job #642852)
#include <stdio.h>
#include <string.h>
using namespace std;
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char x;
int l=0, c=0;
bool ok=true;
while(scanf("%c",&x)==1){
if((x>='a'&&x<='z')||(x>='A'&&x<='Z')){
if(ok==true){
ok=false;
c++;}
l++;}
else
ok=true;}
printf("%d",(int)(l/c));
return 0;
}