Pagini recente » Cod sursa (job #16717) | Cod sursa (job #138501) | Cod sursa (job #957955) | Cod sursa (job #1495542) | Cod sursa (job #1219027)
#include <fstream>
#include <string.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c1,c2,a[100001];
long cuv,lung,i;
bool c1l,c2l;
int main()
{
fin.get(a,100000);
while (i<strlen(a))
{
c1=c2;
c2=a[i];c1l=false;c2l=false;
if (((c2>=65) && (c2<=90)) || ((c2>=97) && (c2<=122))) c2l=true;
if (((c1>=65) && (c1<=90)) || ((c1>=97) && (c1<=122))) c1l=true;
if (c2l) lung++;
if ((!c2l) && (c1l)) cuv++;
i++;
}
fout<<lung/cuv;
}