Cod sursa(job #1525774)
Utilizator | Data | 15 noiembrie 2015 16:08:51 | |
---|---|---|---|
Problema | Text | Scor | 100 |
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");
int s,k;
int main()
{
bool ok=0;
char cuv;
while(!fin.eof())
{
cuv=fin.get();
if(isalpha(cuv))
{
s++;
ok=1;
}
if(!isalpha(cuv))
{
if(ok==1)k++;
ok=0;
}
}
fout<< s/k;
return 0;
}