Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

easy point

Posted on 1998-11-08
1
Medium Priority
?
134 Views
Last Modified: 2010-04-30
In pascal or c, there is a function named 'rem' and 'mod' which return the reminder of the division. Like

         a = 5 rem 2;

then  1 will be stored into a.

         a = 17 rem 3;

then 2 will be stored into a.

Could I get this rem and mod function in vb.
If yes, how, I would like an example.
If no, how can I build this function, I would like a complete code.


Thank a lot.  
0
Comment
Question by:math253
1 Comment
 

Accepted Solution

by:
thunderbug110898 earned 400 total points
ID: 1443871
in VB:

Dim x As Integer

x = 10 mod 2

MsgBox x  ' this will display 0

x = 10 mod 3

MsgBox x ' this will display 1

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question