Cod sursa(job #1687208)

Utilizator DaniellDa Vinci Daniell Data 12 aprilie 2016 18:40:30
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <fstream>
#include <cmath>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");

int main()
{int k=0,m=0,a;
bool l;
char x;
while(fin.get(x))
{a=floor(x);
if(a>=65&&a<=90||a>=97&&a<=122)
{if(!l)
l=1,m++;
k++;}
else l=0;
}
fout<<k/m;
return 0;
}