Cod sursa(job #611595)
| Utilizator | Data | 2 septembrie 2011 10:22:40 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include<fstream>
#include<string>
using namespace std;
char c;
long l,cuv;
int main()
{
ifstream f("text.in");ofstream g("text.out");
while(!f.eof())
{
f.get(c);
if(((c<123)&&(c>96))||((c<91)&&(c>64)))
{
while(!f.eof() && ((c<123)&&(c>96))||((c<91)&&(c>64)))
{
l++;
f.get(c);
}
cuv++;
}
}
g<<l/cuv;
f.close();
g.close();
return 0;
}
