Answers for "convert array to number"

4

convert array to number

let x = [1,2,3,4,5]
let num = +x.join("")
Posted by: Guest on August-19-2020
1

number to number array

public int[] IntegerArrayNum(int num)
    {
        var ls = new List<int>();
        foreach ( var i in num.ToString().ToCharArray())
        ls.Add(Convert.ToInt32(i.ToString()));
        return ls.ToArray();
    }
Posted by: Guest on September-16-2021
0

how to convert array to int

int i, k = 0;
for (i = 0; i < n; i++)
    k = 10 * k + a[i];
Posted by: Guest on August-17-2020

Code answers related to "convert array to number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language