Cod sursa(job #675332)
| Utilizator | Data | 7 februarie 2012 15:40:52 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
#include<iostream>
#include<fstream>
using namespace std;
int cuv=0, lit=0, ok=0;
char s;
int main()
{
ifstream f("text.in");
ofstream h("text.out");
s=f.get();
while(s!=EOF)
{
if( (s>='A' && s<='Z') || (s>='a' && s<='z') )
{
lit++;
if(!ok)
{
ok = 1;
cuv++;
}
}
else
{
ok=0;
}
s=f.get();
}
h<<lit/cuv;
f.close();
h.close();
return 0;
}
