Cod sursa(job #2304668)
Utilizator | Data | 18 decembrie 2018 14:18:49 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char s;
int nr,x,i,nr1;
bool OK;
int main()
{
while(f>>noskipws>>s)
{
if(isalpha(s))
nr++;
while(isalpha(s))
nr1++,f>>noskipws>>s;
}
g<<nr1/nr;
return 0;
}