Pagini recente » Cod sursa (job #52285) | Cod sursa (job #2934529) | Cod sursa (job #1639471) | Cod sursa (job #1353471) | Cod sursa (job #1576396)
#include <iostream>
#include <fstream>
using namespace std;
string s;
long long w,l,n,i,k=0,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++;
else if ((((s[i]>=65) and (s[i]<=90)) or ((s[i]>=97) and (s[i]<=122)))
or (((s[i+1]>=65) and (s[i+1]<=90)) or ((s[i+1]>=97) and (s[i+1]<=122)))) c++;
}
g<<l/c;
return 0;
}