Output control by two analog input values

Can someone help me to develop a simple software control in Arduino 1.
I need to have a output from LOW to HIGH depending of the two analog input comparation values, this need to be a AND logic.
a.e. Analog Input 1 needs to be = > to 3; Analog Input 2VDC needs to be between 2VDC and 3VDC, if both conditions are accomplished the Digital Output need to go up to 1.

Thanks for your support

Sounds a bit too much like a homework assignment to me.

As long as you know how to read an analog input, set a digital output and use if statements it’s really simple. This can be done in one line of code; use a few lines if readability is part of the requirements.

int a0 = analogRead(0);
int a1 = analogRead(1);

if ((a0 > 614) && ((a1> 410) && ( a1 < 614)))
{
    digitalWrite(2, HIGH);
}
else
{
    digitalWrite(2, LOW);
}

It's Indeed that easy.
Bonus points for condensing that into a single line starting with digitalWrite(

Gotta leave something for him to do :wink: