For future reference, please surround your code in tags as found in my signature.
the answer is: "+ num;, the compiler can't find the variable num, because it doesn't exist in the scope it is used....