|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
how to count the occurence of the certain number in a variable
hi all,
i have a quite urgent problem to solve i have the variable in the double format an i need to count the frequency of the appearance of the numbers? does anybody seen an example of such an algorithm or have any idea how to solve the problem? thanks in advance --baronlynx-- |
|
#2
|
|||
|
|||
|
To clarify the problem....
You want to split the number up into it's digits and count how many times each digit occurs? Use a combination of INT() and Mod functions to get the last digit and remove it. Repeat until you have all the digits. 12345 Mod 10 = 5 int(12345/10) = 1234 Hope this helps Last edited by Stev : March 15th, 2004 at 01:26 AM. |
|
#3
|
|||
|
|||
|
thanx
it's been a while and i forgot tho thank you for help
![]() thanx a lot |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > how to count the occurence of the certain number in a variable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|