Pagini recente » Diferente pentru utilizator/mastermage intre reviziile 5 si 6 | Cod sursa (job #1986529) | Cod sursa (job #1371093) | Cod sursa (job #1727322) | Cod sursa (job #1571623)
#include<fstream>
#include<cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char s;
int lung,cuv,ok;
int main(){
while( fin.get(s) ){
if( ( 'A' <= s && s <= 'Z' ) || ( 'a' <= s && s <= 'z' ) ){
lung++;
ok = 1;
}else{
if( ok == 1 ){
cuv++;
ok = 0;
}
}
}
fout << lung/cuv;
return 0;
}