Cod sursa(job #2613369)
Utilizator | Data | 9 mai 2020 16:33:06 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int n,l,ok;
int main(){
while(fin.get(c)){
if(isalpha(c)){
l++;
if(!ok){
n++;
ok=1;
}
}
else ok=0;
}
fout<<l/n;
return 0;
}