Cod sursa(job #1687201)
Utilizator | Data | 12 aprilie 2016 18:37:44 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <fstream>
#include <cmath>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int k,m,a;
bool l;
char x;
int main()
{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;
}