Cod sursa(job #2072995)
Utilizator | Data | 22 noiembrie 2017 16:33:33 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s;
int nr=0,nrc=0,k;
while(f>>s);
{
if(isalpha(s))
nrc++;
while(isalpha(s)&&!EOF)
{
nr++;
f>>s;
}
}
f.close();
g<<nr/nrc;
g.close();
return 0;
}