Cod sursa(job #1729789)
| Utilizator | Data | 15 iulie 2016 17:18:59 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <fstream>
using namespace std;
int lung,nrcuv,ok;
int main() {
char c;
ifstream fin("text.in");
ofstream fout("text.out");
while(fin.get(c))if(isalpha(c))lung++,ok=1;else if(ok)nrcuv++,ok=0;
fout<<lung/nrcuv;
return 0;
}
