Cod sursa(job #1185541)
Utilizator | Data | 15 mai 2014 22:30:45 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char c;
long int lg,nr,k;
int main()
{
c=f.get();
while(!f.eof())
{
if((c>='a' && c<='z')||(c>='A' && c<='Z'))
lg++,k++;
else
if(k>0) nr++,k=0;
c=f.get();
}
g<<lg/nr;
}