08-19-2009, 01:32 PM
|
#16 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
|
Challenge 4 (Salathe: added title so we can keep track)
Here is one that may be a brain teaser ...
Without using the following Control Structures, Operators, print or echo. Create a snippet that while display a list of numbers 0 - 100 and backdown to 100 - 0 using only 3 lines of code in a unordered listed format
Only PHP Counts toward the line count.
Multiple un-nested functions existing on one line are considered a separate line for each function.
All function logic (anonymous and custom) are considered a seperate line from the declaration.
php Code:
function($value){ $logic = 'asd'; }
Would be 2 lines
Have Fun!
Final Result should be - 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7 ... etc etc
- 100
- 100
- 99
- 98 ...
Last edited by ioan1k : 08-19-2009 at 02:55 PM.
Reason: Clarify line count confusion :)
|
|
|
|