Cod sursa(job #2208730)
Utilizator | Data | 31 mai 2018 09:21:35 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
int nrLitere, nrCuv;
char c;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
while (fin.get(c)) {
if (isalpha(c)) {
nrCuv++;
while (isalpha(c)) {
nrLitere++;
fin.get(c);
}
}
}
fout << nrLitere / nrCuv;
return 0;
}