you're almost there just need to have both the bottom limit and the top limit in the same if statement.
Also I'll use a variable to temporarily store the value of the compass.
So there's your code, it should do what you want. Although it'll beep continuously when between 100 and 200. If you just want it to beep once, thats a pretty easy fix.
One thing and please don't take this the wrong way. I'm happy to help with as many programming questions as you have, but this is really really basic "C" stuff. I recommend reading up on how to program in C or C++. It'll help this all make alot more sense.
I like this book (because its both good and free): http://greenteapress.com/thinkcpp/