(PHP) MATHS SCRIPT III

종료 등록 시간: 3년 전 착불
종료 착불

i need a skilled coder to write me a program in php which will compute values on the screen and transfer them into a grid.

Program

------------------

take any number and apply the following rules

1. If the number is EVEN divide it by 2.

2. if the number is ODD, multiply it by 3, then ADD 1 to the result, then divide this result by 2.

3. if the number is = 1, STOP.

Rule 3 is important and our goal is to reach 1 when we reach 1 the program will stop executing.

Example 1 (EVEN)

suppose we start with x = 4.

applying the rules will mean

x = 4 is EVEN so rule 1 applies again and we go from 4 to 2

x = 2 is EVEN so rule 1 applies again and we go from 2 to 1

x = 1 so rule 3 applies and we STOP.

the full sequence generated is {4,2,1}

Total Elements in the sequence is 3.

Total Iterations to reach the goal (=1) is 2.

Note Total Iterations to reach 1 is always 1 less than total elements in the sequence.

Special case of x =1 we are already at 1 so we stop (i.e not even start) so the sequence is technically {1} and the Iterations to reach goal is 0.

Example 2: (ODD)

x = 3.

x= 3 is ODD so Rule 2 applies and 3 maps to (3(3) + 1) / 2 = (10/2) = 5

x= 5 is ODD so Rule 2 applies and 3 maps to (3(5) + 1) / 2 = (16/2) = 8

x= 8 is EVEN so Rule 1 applies and 8 maps to (8) / 2 = 4

x= 4 is EVEN so Rule 1 applies and 8 maps to (4) / 2 = 2

x= 2 is EVEN so Rule 1 applies and 8 maps to (2) / 2 = 1

x= 1 so Rule 3 applies and we STOP.

Sequence generated = {3,5,8,4,2,1}

Total Elements in the sequence is 6.

Total Iterations to reach the goal (=1) is 5.

Your job

write a phpscript which will

1. ask for a starting number x (e.g 3)

2. ask for a GOAL (default is 1)

3. compute the iterates i.e. 5,8,4,2,1 using the 3 rules above

4. STOP the program when the GOAL is reached

4. output the sequence of iterates on the screen

5. output total number of iterations to reach 1.

e.g suppose i enter 3 into the box and press RUN then

the program will run and the output will be

Sequence for x= 3: {3,5,8,4,2,1}

Iterations to reach Goal (=1): 5

Note: id like u to allow me to alter the rules too, example EVEN RULE x -> x/2 by default but i might decide to make it x-> 2x so we would have a box and i can enter a scalar multiple example 2 or 0.5

similarly for ODD RULE we can have a box to enter 2 values e,g the odd rule is 3X +1 / 2

i could say 7X + 5 or 11X + 7 / 2 so theres 3 values can be modified

the general formula is (AX + B) / C. i am free to choose any A,B,C

default will be A=3 B=1 C=2

Regards.

PLEASE NOTE i will need further work done on this so please if u do this properly i can give u more work

We can store answers in the DB also if we want. for research and to study the numbers

PHP JavaScript MySQL HTML

프로젝트 ID: #28403224

프로젝트 소개

19 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: 3년 전

이 일자리에 대한 프리랜서 19 명의 평균 입찰가: $130

developersshop

Respected Sir!, I'm an expert Developer and Designer of having 6+ years of experience in development and Designing. I am readily available to work with you in your project (PHP) MATHS SCRIPT III as per your needs. Let 기타

$220 USD (2일 이내)
(163 리뷰)
6.7
bobrovpavelwork

High Quality + Fast Speed = Excellent Result + Business Success, this is my work-ing style. I have gone through your Job post and I can understand your job requirement thoroughly. As a talented developer, I have a tota 기타

$140 USD (1일 이내)
(48 리뷰)
6.1
rahadkp50

Hi, I am expert PHP, mySql Developer and confident about your project to make a script which will compute values on the screen and transfer them into a grid. I can easily do this . I am the best person for this job. I 기타

$50 USD (1일 이내)
(72 리뷰)
5.9
amrafifi73

Hi, Please choose me. I can carryout this task in 3 hours perfecty. When I receive your asking, I will start this work soon. Looking forward to hearing from you soon. Best regards.

$30 USD (1일 이내)
(29 리뷰)
5.9
zimenkoilya2

✨⭐⭐Dear Employer⭐⭐✨ This is ilya and I have just read your job posting and read your requirements with care, I have been working as a software developer for over 5 years and have many experiences with ✔ WEBSITE DESIG 기타

$30 USD (2일 이내)
(29 리뷰)
5.6
greatswork

Hi, I have reviewed the project description, I am an expert designer in the field and have 10 years of experience. I have skills in wordpress, PHP, AJAX, workerMan, .NET CORE, Aspx, HTML5, JSP, RUBY, Vuejs, JavaScript, 기타

$200 USD (1일 이내)
(28 리뷰)
5.6
hladunkonstantyn

Hi, Patrick I read your description and I understand what you want As a top developer, I can do it in short time If you hire me, you will get good result Please contact me Thanks, Kostyantyn

$140 USD (1일 이내)
(21 리뷰)
5.5
ITServices24y7

Hello Dear, I have read your post for "MATHS SCRIPT" which will compute values on the screen and transfer them into a grid. I read your post carefully & will provide you a Formulating Script along with a BD for storing 기타

$130 USD (1일 이내)
(14 리뷰)
6.0
DmitriiTols

Hello there! I am an expert in Web and Mobile app development with 8 + years of experience. I have vast experience in this field and have done many social apps, e-commerce apps, etc.. I am very confident about this p 기타

$50 USD (1일 이내)
(22 리뷰)
4.9
dmabdeveloper

Dear Patrick. Nice to meet you. I've just read your job description carefully and I feel this project is best fit to my skill and experiences. So I think that I can finish your work perfectly as you need. I have many e 기타

$100 USD (7일 이내)
(14 리뷰)
5.0
hiteshsinghal8

Hello there, I will give you a demonstration within 12-15 hours Warm Regards Hitesh Singhal

$222 USD (2일 이내)
(28 리뷰)
4.9
technonazmul

Hi, I have read your job description and I think I am a perfect fit for your project. I can provide you with best results in no time. Inbox me to discuss further about it. Kind Regards Nazmul

$140 USD (7일 이내)
(10 리뷰)
3.5
romansydorenko07

Hello, Patrick ⭐ ⭐ ⭐ ⭐ ⭐ PHP expert and MATH master ⭐ ⭐ ⭐ ⭐ ⭐ I have a specialty in Website Development. You will be fascinated by my skills. I'd like to help and finish your project. So, I think that I can complete 기타

$140 USD (7일 이내)
(4 리뷰)
3.6
eunoia0107

Hello, How are you today? Thank you for posting this project, and I'm very happy to bid your project. I've read carefully your project details. I have rich experiences related with your project. I can be a good cand 기타

$140 USD (3일 이내)
(15 리뷰)
3.2
nadezhda319

Dear Client. Hope you are doing well. ⭐⭐⭐Available NOW and Can start Immediately.⭐⭐⭐ High Quality + Fast Speed = Excellent Result + Business Success, this is my working style. I am a full-stack developer who has rich 기타

$250 USD (2일 이내)
(5 리뷰)
2.4
manuvelsubin

Hi, I hope you doing well. I have 8 year experience in Web Development using PHP, MySql. I read the requirement clearly, what is the expected output. I can check the 3 rules using PHP and display the output. If need 기타

$75 USD (1일 이내)
(6 리뷰)
2.7
impetus21

Hello, You want a Math application by which you can compute values on the screen and transfer them into a grid. You want functionality like- 1. If the number is EVEN divide it by 2, 2. if the number is ODD, multiply i 기타

$135 USD (8일 이내)
(1 리뷰)
2.9
bhargab3

Hi, I have experience of around 8 years. Now I am working with a in house Automation development team. Surely I can help you.

$30 USD (7일 이내)
(0 리뷰)
0.0