That loop, by the way, should really be done as a for-loop. Using do - while is completely meaningless. And if you insist on using this loop-form, at least write numberarrayplace++ to add one to your current position.

And again, it would be much clearer with a for-loop (using break to exit the loop), and at least using "variable++" where you increment something.

Code:

memorycount = 20;
memoryscore = 100 * (memorycount / 20);

You are not going to get much other than 100 out of this, are you?

But more importantly, if memorycount is not 20, then you'll always get zero, becuase x / y in integer math becomes zero if abs(x) < abs(y). Perhaps you would prefer to multiply memorycount by 100 first, then divide by the number of questions. That way, you get a "percentage number".