Cod sursa(job #2152798)
Utilizator | Data | 5 martie 2018 20:01:48 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int nr,t;
bool ok;
int main(){
while(fin.get(c)){
if((c>='a'&&c<='z')||(c>='A'&&c<='Z')){
if(ok==false){
ok=true;
nr++;
}
t++;
}
else{
ok=false;
}
}
fout<<t/nr;
return 0;
}