Cod sursa(job #782203)
Utilizator | Data | 26 august 2012 12:11:57 | |
---|---|---|---|
Problema | Text | Scor | 80 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<stdio.h>
#include<string.h>
int s,poz,i,cuv,rrr=9999;
char c,cc;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF)
{
cc=c;
if(c<='A')
{
s+=poz;
if(poz!=0)
cuv++;
poz=0;
while(c<'A'&&scanf("%c",&c)!=EOF)
rrr--;
i--;
}
poz++;
}
printf("%d",s/cuv);
return 0;
}