Konversi array menjadi nomor
let x = [1,2,3,4,5]
let num = +x.join("")
Lively Llama
let x = [1,2,3,4,5]
let num = +x.join("")
var arrayOfNumbers = arrayOfStrings.map(Number);
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();
}
int i, k = 0;
for (i = 0; i < n; i++)
k = 10 * k + a[i];