Cod sursa(job #728643)
| Utilizator | Data | 28 martie 2012 20:39:56 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
#include<fstream>
#include<string>
#include<cstdio>
#define in "text.in"
#define out "text.out"
using namespace std;
int main()
{
freopen(out,"w",stdout);
ifstream inn(in);
ofstream outt(out);
bool ok=0;
char c;
int l=0,cuv=0;
while(inn.get(c))
{
if(isalpha(c))
{
ok=1;
++l;
}
else if(ok)
{
ok=0;
++cuv;
}
}
printf("%d",l/cuv);
return 0;
}
