Detect remainder

Posted on 2004-11-17
Last Modified: 2012-08-14

If I divided a number, how would I find out if there was a remainder after the division

Question by:adam_pedley
    LVL 2

    Accepted Solution

    you could use

    reminder=num1 MOD num2

    which gives you the reminder...

    LVL 2

    Expert Comment

    I mean remainder :)
    LVL 4

    Author Comment

    Just found this sample which detects a leap year    

    Function bIsLeapYear(ByVal dDate As Double) As Boolean
            bIsLeapYear = ((dDate Mod 4 = 0) And (dDate Mod 100 <> 0)) Or (dDate Mod 400 = 0)
    End Function


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now