Find Jobs
Hire Freelancers

Convert ruby to php

$10-30 USD

进行中
已发布超过 9 年前

$10-30 USD

货到付款
Convert this code from ruby to php arraynumbers = [50,24,5,1,20,30,40,60] targettotal = 100 # sum up the total of the elements of array def total(arr) [login to view URL] { |total, n| total + n } end def find_sol(arr, targettotal) if targettotal > 0 [login to view URL] do |el| if el == targettotal return [el] elsif el < targettotal sub_arr = arr[([login to view URL](el)+1)..-1] ans = find_sol(sub_arr, targettotal - el) if [login to view URL] > 0 return [el] + ans end end end end [] end # sort numbers descending answer = find_sol([login to view URL] { |x,y| y <=> x }, targettotal) puts answer.to_s puts "Total: " + total(answer).to_s
项目 ID: 6463131

关于此项目

3提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hello sir, I have 6+ year experience in website development and customization. Also i expert in jquery and javascript. Please check my past work [login to view URL] [login to view URL] [login to view URL] I able to make this work with good quality. Thanks
$20 USD 在1天之内
4.9 (17条评论)
4.1
4.1
3威客以平均价$26 USD来参与此工作竞价
用户头像
Hello Sir, I'm 5 years experience in PHP and I'm interested in this job. I'm available to do this task right now. Looking forward to hear from You. Thanks,
$29 USD 在1天之内
4.9 (27条评论)
4.8
4.8
用户头像
Hi, Yes i checked the code. I can convert to php. Send me msg and lets start. I am online. Thanks
$30 USD 在1天之内
4.3 (10条评论)
2.2
2.2

关于客户

SOUTH AFRICA的国旗
South Africa
0.0
0
会员自5月 29, 2013起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。