lamb chili (with mozerella) and an assortment of steamed veg.
tj for the maths boffs:
If I have a number of variable length, e.g. 439, how do I get the 'middle' number (3 in that example)?
(
Jenk Neptune is a pedant and now I can't fit my sig in, Wed 17 Jun 2009, 17:47,
archived)
Count in from either end and see where your fingers meet.
(
Neptune A dole queue dosser and foul mouthed chav., Wed 17 Jun 2009, 17:48,
archived)
Are you talking about coding?
(
SuperMatt, Wed 17 Jun 2009, 17:50,
archived)
Because you could do something with substrings
or, I think, mod might be able to do it.
But don't quote me on that.
(
SuperMatt, Wed 17 Jun 2009, 17:51,
archived)
Not possible using a math approach.
Plus if the string is an even number of numbers - problem.
(
lion-cake Bad lion-cake, bad., Wed 17 Jun 2009, 17:55,
archived)
no, arithmetic.
if it were coding, it'd be peasy..
echo $num[floor(strlen($num)/2)];
(
Jenk Neptune is a pedant and now I can't fit my sig in, Wed 17 Jun 2009, 18:02,
archived)
All decimal numbers can be written "long-hand" as
c
0 × 10
0 + c
1 × 10
1 + c
2 × 10
2 + ... + c
n × 10
n (more typically written as c
n...c
2c
1c
0; e.g. 439 is 4 × 10
2 + 3 × 10
1 + 9 × 10
0.)
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.
(
The Mock TurtIe ™ --- Thinks you are a cunt, on, Wed 17 Jun 2009, 18:16,
archived)
write the number on a sticker
stick the sticker to a dog
push the numbered sticker stuck dog into a usb hole
(
glued eel /questions/questionsyoudliketoask/post1648081, Wed 17 Jun 2009, 17:51,
archived)