Cod sursa(job #243722)

Utilizator ProcopliucProcopliuc Adrian Procopliuc Data 13 ianuarie 2009 21:50:22
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
# include <stdio.h>
# include <string.h>
long int k,l,ok,i,q,y;
char c;
int main ()
{
freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);



q=0;
while (scanf ("%c",&c)!=EOF)
if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
k++;
ok=1;
q=1;
}
else
if (ok==1)
{
l++;
ok=0;
q=0;
}
if (q==1)
l++;
printf ("%i",k);
printf (" %i",l);
printf (" %i",k/l);
return 0;
}