function Noname() {
var count = prompt("What is the number?", "");
count > 0;
if (isNaN(count)) {
alert("Please repeat and enter the number");
}
if (count % 25 == 0) {
count -= 25;
}
if (count % 10 == 0) {
count -= 10;
}
}
var arr = [100,25,5,1];
function decomposite (a) {
var decompositeArray = [];
arr.forEach((item, i) => {
if (!decompositeArray[i]) {
decompositeArray[i] = 0;
}
while (a >= item) {
a -= item;
decompositeArray[i] += 1;
}
});
return decompositeArray;
}
decomposite(132);
[1, 1, 1, 2]
decomposite(300);
[3, 0, 0, 0]