1. ## Task from School :) help anyone!?

Hi people
I've got this task from php class at school but I realy don't know where to start, maybe someone can help me out:

I need to... 1. Generate 5, 2 digit numbers (i.e. 20, 43, 65, 49, 22) randomly without repeating any number
then 2. I need to add 23% of each number to itself and round it up (i.e. if I got 43 then I need to add 23% to it which is 9.89 means 43+9.89=52.89 then round it up which means 53) and then 3. I need to add them all together and substruct from 10000 (i.e. after procedures 1 and 2 I'll have 25, 53, 80, 61, 28 which means 247 after adding them together and when substructing from 10000 I'll get 9753)

o.k.
so it sounds simple but Its realy difficult for me... can anyone help?
ohh yehh and one more thing, I need to make it user friendly on the web which means... I'll have to make a button like next, and each time you press it it will jump a procedure and write down which numbers it took and what is happenning to the number (like add or % percent addon or substruct etc.etc.)

2. Dude.... that's simple math stuff.
First.... Check out http://www.php.net/rand for the random function. (check the user comments at the bottom, that always helps me)
Second... Searh php.net for all the other math functions. very easy to find...
Third... your page design should go like this:
1. Generate numbers, dislay them and a next button. (put a hidden variable or something that is named "nextpage" and equals "page2" or something.
2. Check the \$_POST['nextpage'] to display second part.
3. Display results and another next button.
4. Rinse, repeat.

3. How are you learning anything if we do this for you?

4. Agreed.... that's why i was quite vague on things

5. Originally Posted by Great-morduk
Hi people
I've got this task from php class at school but I realy don't know where to start, maybe someone can help me out:

I need to... 1. Generate 5, 2 digit numbers (i.e. 20, 43, 65, 49, 22) randomly without repeating any number
then 2. I need to add 23% of each number to itself and round it up (i.e. if I got 43 then I need to add 23% to it which is 9.89 means 43+9.89=52.89 then round it up which means 53) and then 3. I need to add them all together and substruct from 10000 (i.e. after procedures 1 and 2 I'll have 25, 53, 80, 61, 28 which means 247 after adding them together and when substructing from 10000 I'll get 9753)

o.k.
so it sounds simple but Its realy difficult for me... can anyone help?
ohh yehh and one more thing, I need to make it user friendly on the web which means... I'll have to make a button like next, and each time you press it it will jump a procedure and write down which numbers it took and what is happenning to the number (like add or % percent addon or substruct etc.etc.)
I'll do it for you for \$500

6. Originally Posted by geniusgoalie
I'll do it for you for \$500
LOL bargin that is!

7. O.k. I did it by myself... I didn't wanted anyone to do it for me, I just wanted direction.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•