import java.util.Scanner;
public class Exercicio4 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Digite a senha");
int senha = sc.nextInt();
while (senha != 2024); {
System.out.println("Senha invalida");
senha = sc.nextInt();
}
System.out.println("Acesso liberado");
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: