Cod sursa(job #1315608)
| Utilizator | Data | 12 ianuarie 2015 22:24:46 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.31 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream g("text.in");
ofstream gg("text.out");
int main()
{
int l=0,ok=0,c=0;
char s;
while(!g.eof())
{
g.get(s);
if(isalpha(s)) { l++; ok=1; }
else if(ok==1) { c++; ok=0; }
}
gg<<l/c;
return 0;
}
