Cod sursa(job #24751)
Utilizator | Data | 3 martie 2007 15:37:16 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<fstream.h>
ifstream in("text.in");
ofstream out("text.out");
int main()
{
long long unsigned k=0,j=0,cont;
char ch;
while(in.good())
{
in.get(ch);
if(ch<='z' && ch>='a' || ch<='Z' && ch>='A')
{
k++;
cont=1;
}
else
if(cont==1)
{
j++;
cont=0;
}
}
out<<k/j;
return 0;
}