vendredi 4 mars 2016

How to show a random array of char in delphi

I'm currently busy writing a math programme/game.

I am using three labels namely:

lblNum1 and lblNum2 = Shows random number between 0 and 13

lblOpp = Shows random operator [+, -, ×, ÷]

I'm struggling to find a code on how my lblOpp can generate a random char from the list [+, -, ×, ÷]

I put the operators in an array 'operator : array[1..4] of char;' It was easy to display the numbers on random, since the random function only works with integers. I just don't know how to display my array values on random. Please help, thanks.




Aucun commentaire:

Enregistrer un commentaire