Cod sursa(job #1020344)
Utilizator | Data | 1 noiembrie 2013 22:32:02 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <iostream>
#include <fstream>
#include <cstring>
#include <cctype>
using namespace std;
int main()
{
ifstream fin("text.in");
ofstream fout("text.out");
int i;
char a;
int s=0,k=0,ok=1;
while(fin.get(a))
{
if(isalpha(a))
{
s++;
if(ok)
k++,ok=0;
}
else
ok=1;
}
fout<<s/k;
return 0;
}