Cod sursa(job #705529)
Utilizator | Data | 4 martie 2012 16:09:05 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include<fstream>
using namespace std;
int main(){
ifstream in("text.in");
ofstream out("text.out");
int c,s=0,nrc=0;
bool cuv=false;
while(in.good()){
c=in.get();
if(islower(c) || isupper(c)){
if(!cuv){
cuv=true;
nrc++;
}
s++;
}else{
cuv=false;
}
}
out<<s/nrc;
return 0;
}