• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

quick n00b visual basic question

iamme

Lifer
how do i set up an division equation to return the value without the remainder (not rounding up)?

for example: i want 3 / 2 to equal 1 (dropping the 1/2 remainder). when i declare the numbers as integers, it seems to round it up to 2.
 
If you = don't know

Then

Let you = do your own research

If

You - homework = fail class

Then

You = retake class


😀
 
You could also use the "\" operator to force integer division instead of "/" which does floating point division.

Dave
 
Originally posted by: Skoorb
The proper way is to use "MOD". I can't remember the exact syntax, but search on google 🙂

While you could use MOD to find the remainder and then subtract that from the floating point division...it would be much easier to use int(x/y) or '\"to get your result.
 
Back
Top