Cod sursa(job #1687214)
Utilizator | Data | 12 aprilie 2016 18:43:49 | |
---|---|---|---|
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,m,a,l;
char x;
k=0;m=0;
while(fin.get(x))
{a=floor(x);
if(a>=65&&a<=90||a>=97&&a<=122)
{if(!l)
l++,m++;
k++;}
else l=0;
}
fout<<k/m;
return 0;
}