Cod sursa(job #2208696)
Utilizator | Data | 30 mai 2018 22:53:51 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <fstream>
#include <iomanip>
using namespace std;
int i,nr,NR;
char c;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(f)
{
f.get(c);
if(isalpha(c))
{
nr++;
while(isalpha(c))
{
NR++;
i++;
f.get(c);
}
}
}
g<<NR/nr;
return 0;
}