What should i write

hi, i want to know what to write if i want to read if BUTTON1 and BUTTON2 is on
pls tell me how
here is the program
pls tell me what to write in the open and close parentesis

int RGBR = 9;
int RGBG = 10;
int RGBB = 11;
int BUTTON1 = 6;
int BUTTON2 = 5;
int BUTTON3 = 4;

void setup () {

  pinMode(RGBR, OUTPUT);
  pinMode(RGBG, OUTPUT);
  pinMode(RGBB, OUTPUT);
  pinMode(BUTTON1, INPUT);
  pinMode(BUTTON2, INPUT);
  pinMode(BUTTON3, INPUT);
  
}

void loop () {

  if(digitalRead(BUTTON1) == HIGH) {
    digitalWrite(RGBR, HIGH);
    digitalWrite(RGBG, LOW);
    digitalWrite(RGBB, LOW);
  }
  if(digitalRead(BUTTON2) == HIGH) {
    digitalWrite(RGBR, LOW);
    digitalWrite(RGBG, HIGH);
    digitalWrite(RGBB, LOW);
  }
  if(digitalRead(BUTTON3) == HIGH) {
    digitalWrite(RGBR, LOW);
    digitalWrite(RGBG, LOW);
    digitalWrite(RGBB, HIGH);
  }
   if(digitalRead() == HIGH) { 
    digitalWrite(RGBR, HIGH);
    digitalWrite(RGBG, HIGH);
    digitalWrite(RGBB, LOW)
  }
}
if(digitalRead(BUTTON2) == HIGH && if(digitalRead(BUTTON21) == HIGH)
{
  do something here
}

&& is a logical and; || is a logical or.

//Edit
See reply #4 for correction.

Have a look at the reference page for &&, the logical AND - && - Arduino Reference

See if that gives you any ideas.

Steve

what to write if i want to read if BUTTON1 and BUTTON2 is on

With HIGH meaning "on", presumably that means pressed, so have you got pulldown resistors on the pins to make sure they are normally LOW and can't accidentally go HIGH, but only when pressed?

if(digitalRead(BUTTON2) == HIGH && ~~if(~~digitalRead(BUTTON21) == HIGH)

The duplicate if and open parentheses don't belong there.

if(digitalRead(BUTTON1) == HIGH)
{
    if(digitalRead(BUTTON2) == HIGH)
    {
         do something here
    }
}

PaulS:
The duplicate if and open parentheses don't belong there.

You're right, stupid copy/paste mistake.

Thanks