0

ok i need to write something like

if 
{
    days > 5 && minutes > 5
}

basically i need minutes to be around 5 to 10, and cannot be greater than 10. how do i do write this within the same if statement?

Edited by plasticfood: n/a

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by plasticfood
0

if(minutes>5 && minutes<10) should do the trick. If you need 5-10 inclusive, use >= and <=

Edited by coil: n/a

0

thanks, but i also need the days in the if statement with the minutes. it is already in a nested if statement.

0

It's basically the same thing, only you replace 'minutes' with 'days'.

In general, you can use && (and) and || (or) to append as many conditions as you want.

0

oh crap nevermind, it was a typing error all along!! and i thought that i couldn't put 3 conditions in the statement... -_-

Edited by plasticfood: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.