Problem with math formula
Tokuhara
Member Posts: 94
I am making a simple math game for kids and I have a little problem with division numbers.
As it is a game for kids the result must not have decimals like 7/9=0.77
Is there a way to check if the number will have decimals so I can shuffle the formula again?
As it is a game for kids the result must not have decimals like 7/9=0.77
Is there a way to check if the number will have decimals so I can shuffle the formula again?
Comments
If you look it up, it's the "%" symbol, but for GS try to use mod(x,y).
% will work but it's not advised.
Make three integer attributes: num1, num2, answer
Addition:
num1 = random(0,9)
num2 = random(0,9)
answer = num1 + num2
Multiplication:
num1 = random(0,9)
num2 = random(0,9)
answer = num1 * num2
Subtraction:
answer = random(0,9)
num2 = random(0,9)
num1 = answer + num2
Division:
answer = random(0,9)
num2 = random(0,9)
num1 = answer * num2
I've never looked at division that way. And to think you called it basic.
Time to implement and cash-in! $-)
edit: @Tokuhara make sure to use this. It will make things a whole lot simpler for your game
9 (?) 9 = 81
And you have to choose the symbols (+), (-), (x) and (/)
I will try it
Thanks guys!
Having trouble with your game? Sounds like a personal problem.