S
S
Stepan Bykov2021-08-31 06:50:38
JavaScript
Stepan Bykov, 2021-08-31 06:50:38

How to divide a number into fixed values ​​with a remainder?

Hello. I want to understand how to get an array with numbers from a number, the maximum value of which will be n.
For example, I have the number 78. I want to get an array with the numbers 25, 25, 25, 3. How can I do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2021-08-31
@Sleebu

https://ru.m.wikipedia.org/wiki/Division_with_remainder
https://learn.javascript.ru/operators#vzyatie-ostatka

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question