Foreach numbersucesion

@JulioCesar1988
try this vb.net code:

Dim originalNumber As String = "5,544,332"
Dim cleanNumber As String = originalNumber.Replace(",", "")
Dim numberArray As Char() = cleanNumber.ToCharArray()
Array.Reverse(numberArray)
Dim series As Integer() = {2, 3, 4, 5, 6, 7}
Dim results As New List(Of Integer)

For i As Integer = 0 To numberArray.Length - 1
    Dim digit As Integer = Int32.Parse(numberArray(i).ToString())
    results.Add(digit * series(i Mod series.Length))
Next

Result - List(7) { 4, 9, 12, 20, 24, 35, 10 }
“5544332”, reversed to “2334455”, and then applying the multiplication:

  1. 2 * 2 = 4
  2. 3 * 3 = 9
  3. 3 * 4 = 12
  4. 4 * 5 = 20
  5. 4 * 6 = 24
  6. 5 * 7 = 35
  7. 5 * 2 = 10

Please delete duplicated post: