Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
bool ArDaugiau(string E){
string b = "bB";
string a = "aA";
int balskiek = 0;
int priekiek = 0;
for(int i=0; i<E.length(); i++){
if(a.find(E[i]) > b.find(E[i])){
balkiek++
}else{
priekiek++;
}
}
if(balskiek > priekiek){
return true;
}
}
return false;
}
|
correct?
Last edited on
Please, explain what happens on line 7, and when does line 10 execute.
For example, who wins if E="cdefg"?
on line 7 i try to check if if a > b
my line E = abcdefghaaaaa
Last edited on