Cod sursa(job #705676)
Utilizator | Data | 4 martie 2012 19:23:33 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include<fstream>
using namespace std;
int main()
{
ifstream fcin("text.in");
ofstream fcout("text.out");
char c;
long long l=0,nr=0;
bool ok=0;
while(fcin>>c)
if(('a'<=c && c<='z') || ('A'<=c && c<='Z'))
{
l++;
ok=1;
}
else
if(ok==1)
{
nr++;
ok=0;
}
fcout<<l/nr;
return 0;
}