Cod sursa(job #974823)
Utilizator | Data | 18 iulie 2013 13:43:29 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char x;
int lit=0,cuv=0,ok=0;
while(fin.get(x))
{
if(!isalpha(x)&&ok==1)
{
cuv++;
ok=0;
}
else
if(isalpha(x
))
{
lit++;
ok=1;
}
}
fout<<lit/cuv;
return 0;
}