[Solved] i have problems in this code and i get yes in the all answer [closed]


You are comparing all the characters of the String against all the characters of the same String, so of course you find a match and return “yes”. You only need a single loop.

All you need is :

e = 0;
for ( int i = 0 ; i <t ; i++) {    
    f = name.charAt(i);
    if (f==c) {
        e = 1;
        break;
    }
}

1

solved i have problems in this code and i get yes in the all answer [closed]