Results 1 to 3 of 3

Thread: factorial

  1. #1
    waqas urdu is offline Advance Member
    Last Online
    28th January 2020 @ 04:54 PM
    Join Date
    25 Jun 2008
    Location
    Karachi
    Age
    34
    Posts
    1,150
    Threads
    126
    Credits
    145
    Thanked
    16

    Default factorial

    main nay javascript pher aik program banya hy factorial ka ban tu gaya hy lakeen aik formate main dana cha raha hoo as formate main nahee ha raha hy

    code is

    Code:
    <script>
    var fac=1;
    for(i=1;i<=10;i++)
    {
    fac=fac*i;
    document.write(i+"!" +fac+"<br>");
    }
    
    </script>
    asa formate kasay banay ga

    1 =1
    2 × 1 = 2
    3 × 2 × 1 = 6
    4 × 3 × 2 × 1 = 24
    5 × 4 × 3 × 2 × 1= 120

  2. #2
    waqas urdu is offline Advance Member
    Last Online
    28th January 2020 @ 04:54 PM
    Join Date
    25 Jun 2008
    Location
    Karachi
    Age
    34
    Posts
    1,150
    Threads
    126
    Credits
    145
    Thanked
    16

    Default

    any solution plz

  3. #3
    waqas urdu is offline Advance Member
    Last Online
    28th January 2020 @ 04:54 PM
    Join Date
    25 Jun 2008
    Location
    Karachi
    Age
    34
    Posts
    1,150
    Threads
    126
    Credits
    145
    Thanked
    16

    Default

    aray yar isko bhi dakh loo koi zarort hy mujy iski mujy iski logic banana nahee a rahee hy bus

Similar Threads

  1. Find Factorial of a number
    By RanaFaheemAg in forum C++
    Replies: 5
    Last Post: 8th May 2015, 12:53 PM
  2. Replies: 8
    Last Post: 8th September 2013, 03:12 PM
  3. calculate factorial in C++
    By MailKing in forum General Discussion
    Replies: 9
    Last Post: 27th April 2011, 04:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •