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