samedi 1 avril 2017

Random number generation with random operators

I am new to android development and currently working on a simple app which, among other things, needs to generate random numbers with random operators (+, -, *, /) every time. I have a "generate" button which is supposed to give different questions every time it is pressed. I know how to generate random numbers, but I don't know how to generate the random operators so that the question is different every time. I tried using a switch statement but not successful so far (or I'm missing code in it). Can anyone help? Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire