Pagini recente » Cod sursa (job #1277692) | Rating Bocan Sabin Andrei (sabinandrei) | Statistici zanet doru (zanetdoru) | Cod sursa (job #1063564) | Cod sursa (job #1520341)
#include <fstream>
#include <cstring>
using namespace std;
char x;
long long nrCuv, nrL;
bool ok = 0;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
nrCuv = nrL = 0;
while (!f.eof())
{
x = f.get();
if (isalpha(x))
{
nrL++;
ok = 1;
}
if (!isalpha(x))
{
if (ok == 1) nrCuv++;
ok = 0;
}
}
g << nrL / nrCuv;
return 0;
}