Cod sursa(job #2466692)
Utilizator | Data | 2 octombrie 2019 19:59:54 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
int main(){
ifstream fin("text.in");
long long cuvinte=0,litere=0;
string x;
bool z;
while(fin.get(x)){
z=false;
for(auto i : x)
if(isalpha(i))
{
litere++;
z=true;
}
if(z)
cuvinte++;
}
ofstream fout("text.out");
fout << litere/cuvinte;
return 0;
}