b3ta.com talk
You are not logged in. Login or Signup
Home » Talk » Message 6234134 (Thread)

no, arithmetic.
if it were coding, it'd be peasy..

echo $num[floor(strlen($num)/2)];

(, Wed 17 Jun 2009, 18:02, archived)
All decimal numbers can be written "long-hand" as
c0 × 100 + c1 × 101 + c2 × 102 + ... + cn × 10n (more typically written as cn...c2c1c0; e.g. 439 is 4 × 102 + 3 × 101 + 9 × 100.)

you should first find n, divide it by two, and you've got the power of 10 the middle digit multiplies. From there, it gets a little complicated.
(, Wed 17 Jun 2009, 18:16, archived)