Cod sursa(job #565587)
Utilizator | Data | 27 martie 2011 22:27:48 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | gr_4 | Marime | 0.53 kb |
#include <stdio.h>
#include <ctype.h>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
// char x;
char y;
//scanf("%d",&x);
int s=0;
int nr=0;
while(!feof(stdin))
{
scanf("%c",&y);
if(isalpha(y))
{
nr++;
while(!feof(stdin) && isalpha(y))
{
s++;
scanf("%c",&y);
}
}
}
printf("%d",s/nr);
return 0;
}