Cod sursa(job #128645)
Utilizator | Data | 27 ianuarie 2008 16:10:12 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include<fstream.h>
#include<string.h>
int main(){
char c;
int lung=0,ok,y=0,k=0;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
f.get(c);
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{ lung++;
if(k==0) y++;
k=1;
}
else
k=0;
}
g<<(int)lung/y;
return 0;
}