Pagini recente » Diferente pentru problema/cub intre reviziile 29 si 30 | Cod sursa (job #2984009) | Profil flaviu_2001 | Cod sursa (job #1873910) | Cod sursa (job #1256794)
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int ok,nr2,nr1;
char x;
int main(){
while(fin.get(x)){
if (ok==0){
if ((x>='a' && x<='z') || (x>='A'&&x<='Z')){
ok=1;
}
}
if(ok==1){
if ((x>='a' && x<='z') || (x>='A'&&x<='Z')){
nr1++;
}
else {
nr2++;
ok=0;
}
}
}
fout<<nr1/nr2;
return 0;
}