Newbie- Division of a number by 100

Discussion in 'C' started by PORSCHE, Jan 2, 2007.

  1. PORSCHE

    PORSCHE New Member

    Joined:
    Jan 2, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    How could i find out if a number divides exactly by 100??
    To be more clear i would like to find out if the quotient (the answer) is an integer

    Thanks,
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    if(n % 100 == 0)
    {
    //Number is divisble by 100
    }
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice