Pagini recente » Cod sursa (job #737260) | Cod sursa (job #2211791) | Cod sursa (job #701255) | Cod sursa (job #2144695) | Cod sursa (job #2204696)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
int main ()
{
char lit;
int nr=0,nr2=0;
bool cond=false;
while (!fin.eof())
{
fin.get(lit);
int x = lit;
if ((x>=97 && x<=122) || (x>=65 && x<=90))
{
nr++;
cond=true;
}
else if (cond==true)
{
nr2++;
cond=false;
}
}
fout << nr/nr2;
return 0;
}