Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esercizio L.3.15 #43

Open
rimaout opened this issue Mar 21, 2024 · 1 comment
Open

Esercizio L.3.15 #43

rimaout opened this issue Mar 21, 2024 · 1 comment

Comments

@rimaout
Copy link
Member

rimaout commented Mar 21, 2024

image
@LiciaMor18
Copy link

    public static boolean cercaCarattere(String parola, char carattere) {
        boolean val = true;
        for (int i = 0; i < parola.length(); i++) {
            if (parola.charAt(i) == carattere) {
                break;
            }
            if ((i == parola.length() - 1) && (parola.charAt(i) != carattere)) {
                val = false;
            }
        }
        return val;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants