Cod sursa(job #1661575)
Utilizator | Data | 23 martie 2016 23:16:01 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.21 kb |
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int c,l,p;char x;
int main()
{while(f.get(x)) if(isalpha(x))l++,p=1;
else if(p)p=0,c++;
g<<l/c;
}