Pagini recente » Cod sursa (job #2014000) | Istoria paginii utilizator/pascuflorinfmluvt | Cod sursa (job #1539741) | Monitorul de evaluare | Cod sursa (job #1570223)
#include <iostream>
#include <fstream>
using namespace std;
string s;
int w,l,n,i,k=0;
float c;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
getline (f,s);
n=s.length();
for (i=0;i<=n-1;i++)
{
if (((s[i]>=65) and (s[i]<=90)) or ((s[i]>=97) and (s[i]<=122))) {l++;k=1;}
else if (k==1) {w++;k=0;}
}
c=l/w;
g<<c;
return 0;
}