Cod sursa(job #392655)
| Utilizator | Data | 7 februarie 2010 23:22:32 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<fstream>
using namespace std;
char v[10000];
int main()
{
int c=0,cl=0,ok;
char x;
ifstream in("text.in");
ofstream out("text.out");
ok=0;
while (in.get(x))
{
if ( (x>='a'&&x<='z')||(x>='A'&&x<='Z'))
{
if (ok==0)
{
c++;
ok=1;
}
cl++;
}
else
ok=0;
}
out<<cl/c<<'\n';
in.close();
out.close();
return 0;
}
