Pagini recente » Cod sursa (job #2457851) | Cod sursa (job #1080234) | Diferente pentru problema/color3 intre reviziile 2 si 6 | Atasamentele paginii Grigore Moisil 2008 | Cod sursa (job #2922922)
#include <bits/stdc++.h>
using namespace std;
ifstream in ("text.in");
ofstream out("text.out");
int main(){
char ch;
bool cuv=false;
int nrc=0,nrch=0;
while(in>>noskipws>>ch){
if(ch>='a' && ch<='z' || ch>='A' && ch<='Z'){
if(cuv==true){
nrch++;
}
else{
cuv=true;
nrch++;
nrc++;
}
}
else{
cuv=false;
}
}
out<<nrch/nrc;
}