Cod sursa(job #2446973)
Utilizator | Data | 11 august 2019 13:48:20 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#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;
}