This may or may not be related to your problem, but what is the value of "a" at this line: while (a<10){? Hint: you don't know.