Pagini recente » Cod sursa (job #1347673) | Cod sursa (job #2190738) | Cod sursa (job #245811) | Cod sursa (job #434627) | Cod sursa (job #627742)
Cod sursa(job #627742)
#include <cstdio>
#include <iostream>
#define DN 1024*1025
using namespace std;
char x;
int main()
{
int nrcuv=0,nrlitere=0;
freopen("text.in","r", stdin);
freopen("text.out","w", stdout);
bool ok=false;
while(!feof(stdin))
{
scanf("%c",&x);
ok=false;
while((x>='a' && x<='z') || (x>='A' && x<='Z'))
{
nrlitere++;
ok=true;
scanf("%c",&x);
}
if(ok==true) nrcuv++;
//if(x[j]=='!' || x[j]=='?' || x[j]=='.') break
}
printf("%d",nrlitere/nrcuv);
fclose(stdin);
fclose(stdout);
return 0;
}