int [] array = new int [100];
.............................
Scanner input = new Scanner(System.in);
int index=-1;
if(input.hasNextInt())
index = input.nextInt();
try { System.out.println(array[index]);}
catch(IndexOutOfBoundsException e) {
if (index<0) {
//.............
} else if (index>array.length-1) {
//.............
}
}
<div class="container">
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
</div>
.container {
display: grid;
grid-auto-flow: column;
grid-gap: 10px;
grid-template-areas:
"A B"
"A C";
}
.card:nth-child(1) {
grid-area: A;
}
.card:nth-child(2) {
grid-area: B;
}
.card:nth-child(3) {
grid-area: C;
}
.container{
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(2, 1fr);
}
.card:nth-child(1) {
grid-row: 1 / span 2;
}
function regis($pdo, $login, $pass ): bool
{
$res = $pdo->prepare("INSERT INTO users(login, password) VALUES (:login,:pass)");
$res->execute(["login" => $login, "pass" => $pass]);
return true;
}