Cod sursa(job #805777)
Utilizator | Data | 1 noiembrie 2012 09:19:31 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream>
#include<string.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int l,n,sw;
int main()
{
c=fin.get();
while(c!=EOF)
{
if(c>='a'&&c<='z'||c>='A'&&c<='Z')
{l++;sw=1;}
else
if(sw==1)
{n++;sw=0;}
c=fin.get();
}
fout<<l/n;
return 0;
}