Cod sursa(job #1346850)
Utilizator | Data | 18 februarie 2015 17:27:46 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include<cstdio>
int main ()
{freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);
int c=0,l=0,i=0,n;
char a;
scanf("%c",&a);
while(a!=NULL&&i<=10000)
{if((a<='z'&&a>='a')||(a<='Z'&&a>='A'))
{c++;
while((a<='z'&&a>='a')||(a<='Z'&&a>='A'))
{
l++;
scanf("%c",&a);
}
}
scanf("%c",&a);
i++;
}
printf("%d",l/c);
return 0;
}