Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Devision IN VB6

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am constructing a maths program for kids....the last section is a deviision section. Where the numbers devided must result in a whole answer such as 6/3 o give 2

can Anyone help with the code
 
Can you be a little more explicit? To return an integer result from a division, use the "backslash" i.e. \ operator.
Any fractional portion of the result is truncated.

Dim intResult as Integer
intResult = 7 \ 4

will return 1 for intResult
 
To find the division questions, work out the questions using multiplication and then just present the questions as divisions instead of multiplications. This way (depending on how you have coded the multiplication questions) you may be able to reuse code, instead of having to write a complete new section.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top