Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General

Post new topic   Reply to topic
Approximate an Integer
View previous topic :: View next topic  
Author Message
sprog90
Newbie


Joined: 21 Jul 2005
Posts: 20

PostPosted: Jun 15th, 2006 04:40 AM    Post subject: Approximate an Integer Reply with quote

I would like to approximate an Integer. I mean if I have the number 2512, how can I just take the approximation as 2500 or if I have the number 31768, how can I just take the approximation as 32000. Is there a function Question mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sprog90
Newbie


Joined: 21 Jul 2005
Posts: 20

PostPosted: Jul 9th, 2006 08:50 AM    Post subject: Reply with quote

I have find a solution but it is not exactly what i want.
Code:
'for the last 3
n1 = 43553
n2 = (n1 \ 1000) * 1000

'for the last 2
n1 = 43553
n2 = (n1 \ 100) * 100
etc

'Careful, it must be \ not /


If someone else have a better solution please post it here!
_________________
[link]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic