Cod sursa(job #797954)
Utilizator | Data | 15 octombrie 2012 12:25:32 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
using namespace std;
int main()
{
int ok=0,cif=0,cuv=0;
char c=0;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
if(((c>=65)&&(c<=90))||((c>=97)&&(c<=122)))
{ cif++;
if(ok==0)
{
ok=1;
cuv++;
}
}
else
ok=0;
c=f.get();
}
g<<cif/cuv;
return 0;
}