(PHP) MATHS SCRIPT III

Kapalı İlan edilme: 3 yıl önce Teslim sırasında ödenir
Kapalı Teslim sırasında ödenir

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

Proje NO: #28403224

Proje hakkında

19 teklif Uzak proje Aktif 3 yıl önce

Bu iş için 19 freelancer ortalamada $130 teklif veriyor

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 Daha Fazla

$220 USD in 2 gün içinde
(163 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(48 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(72 Değerlendirme)
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.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(29 Değerlendirme)
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 Daha Fazla

$30 USD in 2 gün içinde
(29 Değerlendirme)
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, Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(28 Değerlendirme)
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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(21 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(14 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(22 Değerlendirme)
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 Daha Fazla

$100 USD in 7 gün içinde
(14 Değerlendirme)
5.0
hiteshsinghal8

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

$222 USD in 2 gün içinde
(28 Değerlendirme)
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 in 7 gün içinde
(10 Değerlendirme)
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 Daha Fazla

$140 USD in 7 gün içinde
(4 Değerlendirme)
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 Daha Fazla

$140 USD in 3 gün içinde
(15 Değerlendirme)
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 Daha Fazla

$250 USD in 2 gün içinde
(5 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(6 Değerlendirme)
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 Daha Fazla

$135 USD in 8 gün içinde
(1 Yorum)
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 in 7 gün içinde
(0 Değerlendirme)
0.0