Menu

Rounding up number

Help
2010-03-23
2013-05-30
  • Nobody/Anonymous

    Hi,

    Have a 10bit number, that i need to round up to the nearest 25…. any ideas.

    Thanks

     
  • Dan Damron

    Dan Damron - 2010-04-09

    varout = 0
    do while varout < varin
      varout +=25
    loop

    pretty simple.  Hope that helps you.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.