Find the factorial of 7 using for or while loop

Code with C | Programming: Projects & Source Codes Forums PHP Find the factorial of 7 using for or while loop

This topic contains 1 reply, has 1 voice, and was last updated by  CWC 1 year, 5 months ago.

  • Author
    Posts
  • #12513

    CarltonBirch
    Member

    Hi there,
    how can solve this Php problem in simple way. find the factorial of 7 using for or while loop.

    it show in browser: Parse error: syntax error, unexpected ‘;’ in B:\xampp\htdocs\factorial.php on line 16

  • #12514

    CWC
    Keymaster

    make sure you format your code properly such as

    $n--; and $factorial = ($n * $factorial); (no white space)

You must be logged in to reply to this topic.