How to write an if statement with multiple || and && in C? -


what concise way write if statement more many || , && in c?

i want execute printf statement if either 1,2,4 or 6 , b = 8 , c = 10, can put these conditions same if statement?

eg. can write like:

if ((a = 1||2||4||6) && b == 8 && c == 10)

//do something

this doesn't seem work...

if ((a == 1 || == 2 || == 4 || == 6) && b == 8 && c == 10) 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -