Cod sursa(job #609080)
Utilizator | Data | 19 august 2011 15:19:02 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream>
#include<string>
using namespace std;
char c;
long l,k,i;
int main()
{
ifstream f("text.in");ofstream g("text.out");
while(!f.eof())
{
f.get(c);
if((c>='a' && c<='z') || (c>='A' && c<='Z')) l++; else
if(l)
k++;
}
g<<l/k;
f.close();g.close();
return 0;}