Pagini recente » Cod sursa (job #445105) | Cod sursa (job #211377)
Cod sursa(job #211377)
#include <stdio.h>
#include <iostream>
using namespace std;
int citire()
{
char buffer;
bool k=false;
int n,cuv=0,lungime=0;
freopen("text.in","r",stdin);
while (!feof(stdin))
{
scanf("%c",&buffer);
n=(int)buffer;
if ((n>=65 && n<=90) || (n>=97 && n<=122))
{
lungime++;
if (!k) cuv++;
k=true;
}
else
k=false;
}
return lungime/cuv;
}
int main()
{
freopen ("text.out","w",stdout);
printf ("%d",citire());
fclose (stdout);
return 0;
}