college maths program help...
i have to create and design a small maths program which enables the user to select...
A problem type (addition, subtraction multiplication)
A level (Easy Medium Hard)
Then give the user a series of questions (1 - 10)
And finally display the score the user got
Not quite sure where to start never really used VB before any help would be much appreciated
Re: college maths program help...
you said college math? give me an example of an equation question/
are you talking about 2+3
or integrals and deravitives?
Re: college maths program help...
Welcome to the Forums :wave:
What language are you using? VB6? VB.Net? VBA?
At a very basic level, you would want a group of option buttons that chosses the difficulty, a group of option buttons that chooses the type of question, then a loop through 10 inputboxes each of which displays a randomly selected question from a list, and some kind of variable to keep track of the correct answers. Yes?
So, see if you can follow the below:
Put 6 option buttons on the form. Use the Text or Caption property to change the names - you'll want Easy, Medium, Hard, Addition, Subtraction, Multiplication. Use the Group property of them to put the difficulty options in a group called Diff, and the other 3 in a group called eqType.
In the command button, put something like:
VB Code:
correctcounter = 0
For i = 1 to 10
x = inputbox("Here is a question")
if cint(x) > 5 then
msgbox "Correct"
correctcounter = correctcounter + 1
else
msgbox "Wrong"
end if
Next i
msgbox "You got " & correctcounter & " right"
That gives you the very basics of setting up a loop, asking a specific question and telling the difference between a right answer and a wrong answer, and also tracking how many correct answers you have. You can expand it from there.
Have a stab and then people will be able to help with bits where you have gone wrong.
Also, since this isn't really a maths problem, ask a mod such as MartinLiss to move it to the appropriate forum where you will get a lot more replies.
zaza
Re: college maths program help...
zaza thanks alot, really helped sir.