Even if I agree with Get Off My Lawn, you could have a solution that wok for both, with simple use of modulo.
x = x - (x%10000) + (x%1000)
//29492 => 29492 - 9492 + 492
solved Replace thousand number with 0 on an integer [closed]
Even if I agree with Get Off My Lawn, you could have a solution that wok for both, with simple use of modulo.
x = x - (x%10000) + (x%1000)
//29492 => 29492 - 9492 + 492
solved Replace thousand number with 0 on an integer [closed]