i have a qusetion about some problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yuri1992
Forum Newbie
Posts: 10
Joined: Sun Aug 03, 2008 8:49 am

i have a qusetion about some problem

Post by yuri1992 »

i had a qusteion in my test , i need to build a script that
get a number and the number sum numeral.
exp

123456 = 66 i need to print = 12+3+45+6
5025 = 30 i need to print = 5+0+25
1245= 129 i need to print = 124+5.

how i solve this >
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: i have a qusetion about some problem

Post by califdon »

This is a mathematical problem, not a PHP code problem, even if you are being asked to write PHP code to do it. How would you solve it, manually? What would your thought process be? When you can answer that question, the PHP code should be easy. If you need help after you know how to do it manually, we will help you.
Post Reply