Cod sursa(job #1525768)
Utilizator | Data | 15 noiembrie 2015 16:04:21 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | 11A | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
bool ok=0;
int s,k;
char cuv;
int main()
{
while(!fin.eof())
{
cuv=fin.get();
if(isalpha(cuv))
{
s++;
ok=1;
}
else if(!isalpha(cuv));
{
if(ok==1)k++;
ok=0;
}
}
fout<< s/k;
return 0;
}