Cod sursa(job #1729784)
Utilizator | Data | 15 iulie 2016 17:13:06 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 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.get(c)){
if(isalpha(c))lung++,ok=1;
else if(ok)nrcuv++,ok=0;}
fout<<lung/nrcuv;
return 0;
}