Sha256: 340f49334ca0182eba66d735597c5429825461dffbdb88aaf10e5e6447c72162

Contents?: true

Size: 433 Bytes

Versions: 11

Compression:

Stored size: 433 Bytes

Contents

<?php

function nfact($n) {
    if ($n == 0) {
        return 1;
    }
    else {
        return $n * nfact($n - 1);
    }
}

echo "\n\nPlease enter a whole number ... ";
$num = trim(fgets(STDIN));

// ===== PROCESS - Determing the factorial of the input number =====
$output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
echo $output;

?> <script>  <?php
echo '
';
?>
/*this is js <?php echo ':)'; ?>
</script> not &js;

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
gollum-4.1.4 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-4.1.3 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
inc_gollum-4.1.2d lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
inc_gollum-4.1.2c lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-4.1.2 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-4.1.1 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-4.1.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-4.0.1 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
pollypost-0.0.2 vendor/assets/ace-1.1.8/mode/_test/text_php.txt
gollum-4.0.0 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt
gollum-3.1.3 lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt