Cod sursa(job #2297346)

Utilizator stefanut999Paul Colta stefanut999 Data 5 decembrie 2018 18:58:29
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int n,s;
int main()
{int i;
 bool ok = 0;
 char c,t;
 while(fin.get(c))
 {if(( c>= 'a' && c <= 'z') || (c >='A' && c <='Z'))
      {s++;
        }
else
  if((t >= 'a' && t <= 'z') || (t >= 'A' && t <= 'Z'))
           {n++;
           }

 t = c;

}
fout<<s/n;
fin.close();
fout.close();
return 0;
}