Pagini recente » Cod sursa (job #2046991) | Cod sursa (job #3155426) | Cod sursa (job #445560) | Cod sursa (job #321855) | 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;
}