Thread: Problem with division in C!!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    > r1 = 1, r2 = 1, r3 = 1
    > 1
    > p(2,1)

    p(2,1) == 2!/(1! * 1!) == 2/(1*1). So your value of r1 is wrong. It has nothing to do with the division. Similarly,

    > r1 = 1, r2 = 2, r3 = 1
    > 0
    > p(2,2)

    Here you should have r1 = 2, r2 = 2, and r3 = 1.
    Last edited by robatino; 04-19-2007 at 12:59 PM.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    85
    Thanks
    I'm going to check very carefully my source code and correct my mistakes and if i see that sthg is not
    functioning well I'm going to post again


    Thank you and have a nice evening

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    85
    Hi again

    Well right now i corrected the values i take now the right output but the spaces inside the triangle
    are wrong!
    What shall i do?
    1
    1 1
    1 2 1
    1 3 3 1
    1 4 6 4 1
    1 5 10 10 5 1
    1 6 15 20 15 6 1
    1 7 21 35 35 21 7 1

    Thanks in advance

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. Math Division Problem
    By cookie in forum C Programming
    Replies: 7
    Last Post: 06-14-2007, 10:34 AM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM