Pagini recente » Cod sursa (job #968661) | Borderou de evaluare (job #2139421) | Diferente pentru problema/simetrii intre reviziile 5 si 6 | Cod sursa (job #2820575) | Cod sursa (job #2446973)
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream fin("text.in");
ofstream fout("text.out");
int cuv = 0,cif = 0;
char ch;
bool ok = 0;
while (fin.get(ch)) {
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
cif++;
ok = 1;
}
else {
if (ok == 1)
cuv++;
ok = 0;
}
}
fout << cif / cuv;
return 0;
}