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