Pagini recente » Diferente pentru utilizator/mihaionly intre reviziile 6 si 5 | Profil frumushel | Profil ando | Istoria paginii utilizator/mihai70 | Cod sursa (job #565589)
Cod sursa(job #565589)
#include <cstdio>
#include <cstring>
#include <cctype>
using namespace std;
FILE *fin=freopen("text.in","r",stdin);
FILE *fout=freopen("text.out","w",stdout);
int main()
{
char s[1000000];
int nrc=0,l=0;
while(!feof(stdin))
{
gets(s);
int lg=strlen(s);
for(int i=0;i<lg;i++)
{
if(isalpha(s[i])){
l++;
if(!isalpha(s[i+1]))
nrc++;
}
}
}
printf("%d",l/nrc);
return 0;
}