Arduino - Progressing from an IF loop

I’m trying to create a program that can cycle through a set of questions and respond according to user inputs.
E.g. Asks: Find the even number
User: Presses a button to select which number is right
Program prints “CORRECT/INCORRECT”
Moves onto next question. (This is the part I’m struggling with)
Is anyone able to demonstrate how I could move onto another question after? thanks in advance.

Here’s my code so far:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int val = 0;
int BUTTON = 8;
int Seg1 = 7;
int Seg1Input = A1;
int val2 = 0;
int val3 = 0;
int val4 = 0;
int Seg2Input = A2;
int Seg3Input = A3;
// initialize the library with the numbers of the interface pins
void setup()
{
(Seg1 == HIGH);
lcd.begin(16, 2);
Serial.begin(9600);
randomSeed(666);
pinMode(BUTTON, INPUT);
lcd.print(“Are you Ready?!”);
lcd.setCursor(0, 0);
}

void loop()
{
val2 = digitalRead(Seg1Input);
val3 = digitalRead(Seg2Input);
val4 = digitalRead(Seg3Input);
val = digitalRead(BUTTON);
int Number = 0;
if (val == HIGH)
{
digitalWrite(BUTTON, LOW);
(val == LOW);
(Seg1 == LOW);
delay (100);
(Seg1 == HIGH);
lcd.clear();
lcd.print(“Find The Even”);
//Serial.println();
delay(200);
int Number = (1);
}
else if (val2 == HIGH and Number == 1){
digitalWrite(val2, LOW);
lcd.clear();
lcd.print(“CORRECT”);
delay(1000);
lcd.clear();
lcd.print(“Find Odd Number”);
delay(1000);
val2 = digitalRead(Seg1Input);
Number = (Number + 1);
}
else if (val2 == HIGH and Number ==2){
lcd.clear();
lcd.print(“INCORRECT”);
delay(1000);
lcd.clear();
lcd.print(“Find the x3”);

}
else if (val3 == HIGH and Number ==2){
lcd.clear();
lcd.print(“CORRECT”);
delay(200);
lcd.clear();
lcd.print(“Find the x3”);

}
else if (val4 == HIGH and Number == 2){
lcd.clear();
lcd.print(“INCORRECT”);
delay(200);
lcd.clear();
lcd.print(“Find the x3”);
}
else if (val3 == HIGH and Number == 1){
lcd.clear();
lcd.print(“INCORRECT”);
lcd.clear();
lcd.print(“CORRECT”);
delay(1000);
lcd.clear();
lcd.print(“Find Odd Number”);
delay(1000);
val2 = digitalRead(Seg1Input);
Number = (Number + 1);
}
else
{
return;
}
}

  (val == LOW);
    (Seg1 == LOW);

Can you explain what you think is going on there?

(There's no such thing as an "if loop").

Please remember to use code tags when posting code

{
    digitalWrite(BUTTON, LOW);
    (val == LOW);
    (Seg1 == LOW);
    delay (100);
    (Seg1 == HIGH);
    lcd.clear();
    lcd.print("Find The Even");
    //Serial.println();
    delay(200);
    int Number = (1);
   }

Defining a new "Number" mere nanoseconds before it goes out of scope - not useful.

AWOL:   (val == LOW);     (Seg1 == LOW);

Can you explain what you think is going on there?

(There's no such thing as an "if loop").

Please remember to use code tags when posting code

{
    digitalWrite(BUTTON, LOW);
    (val == LOW);
    (Seg1 == LOW);
    delay (100);
    (Seg1 == HIGH);
    lcd.clear();
    lcd.print("Find The Even");
    //Serial.println();
    delay(200);
    int Number = (1);
   }

Defining a new "Number" mere nanoseconds before it goes out of scope - not useful.

(val == LOW); is setting a variable to low, it goes high when a button is pressed (Seg1 == LOW); is setting the Seg1 pin to low on the board.

I was trying to use a variable to go onto the next question since I couldn't think of a different way for the code to continue on. Therefore I was adding 1 to Number if the if statement is successful so it can then go further on to the next IF statement

(val == LOW); is setting a variable to low, it goes high when a button is pressed (Seg1 == LOW); is setting the Seg1 pin to low on the board.

Wrong on both counts.

AWOL: Wrong on both counts.

So, I don't actually need them in my code?

Therefore I was adding 1 to Number if the if statement is successful so it can then go further on to the next IF statement

No, you are creating a brand new integer called Number with (very) local scope, initialising it to one, then forgetting you ever did that, which is not the smartest thing to do. You're not adding anything, you're assigning. (actually initialising)

Better would have been to assign the value one to the existing Number, which you defined with global scope earlier

Bennybobber: So, I don't actually need them in my code?

You certainly don't need them in the form you have at the moment, because neither assigns anything to anything else. They're pointless comparisons.

AWOL: You certainly don't need them in the form you have at the moment, because neither assigns anything to anything else. They're pointless comparisons.

Ah yes I see now cause there's 2 equals, how silly of me.