I'm creating a mathematics program to help me get better at it
I want to randomly generate an operator so it Adds, Subtracts, Multiplies or Divides depending on what checkbox the user has selected...obviously if the user selects just one e.g. Addition, only the addition operator will be generated but if multiple operations have been selected it will randomize between operators.
The reason i am creating this is to increase my mental arithmetic skills, as it will randomly generate numbers, operators and i have a time limit to answer the question in.
The answer will be shown after the time limit is up or the user clicks "Show Answer".
But for now i only need help generating the operators.
Any help will be much appreciated.
The interface "X" is where the random operator goes.
Dim num1 As Integer Dim num2 As Integer Dim add As Integer Dim sut As Integer Dim mul As Integer Dim div As Integer Private Sub cmdAll_Click() chkAdd.Value = 1 chkSub.Value = 1 chkMul.Value = 1 chkDiv.Value = 1 End Sub Private Sub cmdNew_Click() 'operators add = "+" sut = "-" mul = "*" div = "/" 'I have no idea guys Random = (Rnd(add, sut, mul, div)) If chkAdd.Value = 1 Then lblSign = "+" End If If chkSub.Value = 1 Then lblSign = "-" End If If chkMul.Value = 1 Then lblSign = "*" End If If chkDiv.Value = 1 Then lblSign = "/" End If End Sub

New Topic/Question
Reply




MultiQuote



|