One way of doing this sort of thing (A slightly more complex example than you asked about) :
<img src="https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/Screen%20Capture%20-%20score%20logic%20example.PNG" border="0" />
edit
Updated picture (10:01am 11/01/2014)
I have written it out like this to make it easy to read the logic - this could probably be done in one line using multiple brackets but for this example I thought breaking it up a bit would help ....