Cod sursa(job #196667)
Utilizator | Data | 27 iunie 2008 21:23:11 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
# include <fstream.h>
# include <string.h>
long int k,l,ok,i,q,y;
char c;
float z,x,p;
int main ()
{
fstream f ("text.in",ios::in);
fstream g ("text.out",ios::out);
q=0;
while (f>>c)
if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
k++;
ok=1;
q=1;
}
else
if (ok==1)
{
l++;
ok=0;
}
if (q==1)
l++;
g<<k/l;
return 0;
}