Pagini recente » Cod sursa (job #3125901) | Cod sursa (job #3186108) | Cod sursa (job #2949724) | Cod sursa (job #1972294) | Cod sursa (job #547697)
Cod sursa(job #547697)
#include <stdio.h>
using namespace std;
char c;
long long nr, ltot;
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int este = 0;
while ( !feof(stdin) )
{
scanf("%c", &c);
if ( (('a' <= c && c <='z') || ('A'<=c && c<='Z')) && !este) { ltot++; nr++; este = 1; }
else if ( !( ('a' <= c && c <='z') || ('A'<=c && c<='Z') ) ) este = 0;
else ltot++;
}
printf("%lld", ltot/nr);
}