Ive got a bit of a strange one that I cant get my head round. I am trying to write a simple program for doing mathematic flash cards for a friends daughter. Ive managed to do the addition, subtraction and multiplication but I am a bit bamboozled on the division. What I am trying to do is get 2 random numbers from 1 to 9999 and divide them by each other. The only problem I have got is that I can not show divisions that the answer is a decimal it has to be a whole number ie: -
3/2 = 1.5
As this is a decimal I do not want to show this sum. If its
6/3 = 2
That is ok as it is a whole number. I am just trying to find a piece of code that is capable of doing this please.
Hope this makes sense.