Cod sursa(job #1475334)
Utilizator | Data | 23 august 2015 20:57:09 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<stdio.h>
int l,c,k;
char s;
int main() {
freopen("text.in","r",stdin),freopen("text.out","w",stdout);
while(scanf("%c",&s)!=EOF)
if((s>='a'&&s<='z')||(s>='A'&&s<='Z')) {
if(!k)
c++;
l++,k=1;
}
else
k=0;
printf("%d",l/c);
}