12-08-2011, 12:35 PM
how to find the these numbers by using vb scripting(by using for loop)
pls answer me
Thanks
vasu.

pls answer me
Thanks
vasu.


|
Find 1 4 10 22
|
|
12-08-2011, 12:35 PM
how to find the these numbers by using vb scripting(by using for loop)
pls answer me Thanks vasu. ![]() ![]()
12-08-2011, 10:00 PM
where do you want to find these numbers from?
1)From a group of numbers? 2)From string? Can you please elaborate?
12-14-2011, 11:22 AM
Hi Vasu,
If i have correctly understood the sequence, it is in the form of n=n*2+2, n starting from 1. The following code will yield this sequence Code: Dim arr(10) //Declare an array which will contain the sequence numbers
totNum=4 // Total number in the sequence (here 4 since seq is 1 4 10 22)
arr(0) = 1 //Assign the first place with value 1
For counter=1 To totNum
arr(counter) = arr(counter-1)*2+2
NextThe array should contain the sequence. |
|
« Next Oldest | Next Newest »
|