If you're talking about C, then only the first block that satisfies the condition is executed - after the control "enters" the conditional block it then "leaves" after all other conditions.
If you want such behavior, then just use two separate conditions - remove "else" and you have it.