Cod sursa(job #1505456)
Utilizator | Data | 19 octombrie 2015 10:49:03 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.51 kb |
#include <iostream>
#include <fstream>
#define DM 1024*1100
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char e;
int S,nr,ok;
int main ()
{
int i;
while(fin.get(e))
{
if((e>='a' && e<='z') || (e>='A' && e<='Z'))
{
S++;
if(ok==0)
{
nr++;
ok=1;
}
}
else ok=0;
}
fout<<S/nr;
fin.close();
fout.close();
return 0;
}