Cod sursa(job #874391)
Utilizator | Data | 8 februarie 2013 11:52:14 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <fstream>
#include <string.h>
using namespace std;
int main()
{
int l=0,c=0,ok=0;
char s;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
f.get(s);
if ((s>='a'&&s<='z')||(s>='A'&&s<='Z'))
{ok=1;
l++;}
else
if (ok==1)
{c++;
ok=0;}
}
g<<l/c;
return 0;
}