Cod sursa(job #1520341)
| Utilizator | Data | 8 noiembrie 2015 17:03:43 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#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;
}
