0

15 digit integer split to each 5 digits in javascript?? anyone have solution?

In javascript

27th Sep 2020, 7:31 AM
Thamarai Selvan
Thamarai Selvan - avatar
2 ответов
+ 2
To convert a 15-digit number to 3 5-digit numbers?
27th Sep 2020, 7:59 AM
Aswajith
Aswajith - avatar
+ 2
Try modulo 100000 to get the last 5 digits. y3 = x % 100000 Then you can continue with division and rounding to cut the last 5 digits, and repeat... y2 = parseInt(x / 100000) % 100000
27th Sep 2020, 8:06 AM
Tibor Santa
Tibor Santa - avatar