Đã hoàn thành

132173 Number Adding Function PHP

I am looking to have a function in php created that finds a combination of numbers that add to give you a number that you input into the function.

There is a catch:

I will be provide an array of numbers that are the only ones you may use, and you may not repeat the same number more than once, unless it appears in the array more than once.

You may only add.

What I need returned: an array containing the index values from the initial array showing which numbers you used to get the desired number.

You may use as many or few numbers as you'd like from the provided array. If the numbers can't add to give you the desired number, find the results which give you that closest to the desired number.

You may round to the 2nd decimal place to help as the array may or may not contain decimals past the 2nd decimal place.

Kĩ năng: Bất kì công việc gì, PHP

Xem nhiều hơn: numbers function, number function, n is a number, function of numbers, function numbers, function number, function, add number, php help function, past number, numbers combination results, looking number, php combination numbers, input numbers array, add function, number input, php array add, array numbers, number combination results, combination number, number combination, results function php, add input php, find array array php, array function php

Về Bên Thuê:
( 9 nhận xét ) Seattle, United States

ID dự án: #1878344

Được trao cho:


Sounds fun... Can do it for you quickly. Satisfaction guaranteed..

$7 USD trong 0 ngày
(26 Đánh Giá)