07-20-2009, 09:36 AM | #1 |
FFR Player
Join Date: Jul 2009
Posts: 15
|
Please advice how the following code works
Code:
<html> <!-- test01.php --> <body> <?php $x = 2; for ($i = 1; $i <= 6; $i++) { if ($i % 2 == 1) { $x++; } print $i . 'x' . $i * $x . " "; } ?> </body> </html> Answer: 1x3 2x6 3x12 4x16 5x25 6x30 May I know, how did they arrive at the answer??? Thanks... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|