Jaw Breaker - What's the ansewer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following is a section of PHP code (see Apache.org and PHP.net).

  function f($c) {
    $c++;
    if ($c % 2) { return f($c); }
    return $c++;
  }
  
  function g($n) {  
    for ($i=1;$i<10;$i++) {
      $n = f($n*$i);
    }
    return ($n);
  }
    
  print(g($x));

What is the smallest value that $x can have if 4277108 is outputted to
the screen after running this code?
$x is a number between 1 and 10 and has 2 decimal places.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux