Programming Challenge

Discussion in 'C Programming' started by candy_init@yahoo.com, Jan 4, 2005.

  1. Guest

    The aim is to make a program in C which can calculate the value of a
    determinant of any specified order.The program should work in the
    following way:
    INPUT:
    N: 5 (order of the determinant)
    Enter the 25 elements

    OUTPUT:
    Value of the determinant.

    Candice
    , Jan 4, 2005
    #1
    1. Advertising

  2. dandelion Guest

    <> wrote in message
    news:...
    > The aim is to make a program in C which can calculate the value of a
    > determinant of any specified order.The program should work in the
    > following way:


    For a "challenge" I would have picked something not as chewed out as
    matrix-calculations. Are you sure you are not sneakily trying to
    social-engineer your way out of your homework-assignments?
    dandelion, Jan 4, 2005
    #2
    1. Advertising

  3. Grumble Guest

    wrote:

    > The aim is to make a program in C which can calculate the value of a
    > determinant of any specified order.


    Why don't you do your own homework?
    Grumble, Jan 4, 2005
    #3
  4. On 4 Jan 2005 03:53:25 -0800,
    <> wrote:

    > The aim is to make a program in C which can calculate the value of a
    > determinant of any specified order.The program should work in the
    > following way:


    I don't know what you mean by 'determinant' in this case (matrices?
    biology?), but it looks to me like homework. If you have a question
    about the C language itself, please post it preferably with code
    illustrating your problem, but we are not here to do your homework free
    for you. On the other hand, if you wish to pay me...

    Chris C
    Chris Croughton, Jan 4, 2005
    #4
  5. Guest

    Determinant of a matrix is the modulus of it ie. |M|.
    if M = [a b
    c d] then
    |M| = bc - ad

    (I think)
    , Jan 4, 2005
    #5
  6. On 4 Jan 2005 05:41:15 -0800,
    <> wrote:

    > Determinant of a matrix is the modulus of it ie. |M|.
    > if M = [a b
    > c d] then
    >|M| = bc - ad
    >
    > (I think)


    Maybe (I remember modulus, I don't remember it being the same as the
    determinant, but it's been almost 30 years since I looked at the
    terminology of matrices). However, we're not here to write the code for
    matrix problems, that's the original poster's problem...

    Chris C
    Chris Croughton, Jan 4, 2005
    #6
  7. Mike Wahler Guest

    <> wrote in message
    news:...
    > The aim is to make a program in C which can calculate the value of a
    > determinant of any specified order.The program should work in the
    > following way:
    > INPUT:
    > N: 5 (order of the determinant)
    > Enter the 25 elements
    >
    > OUTPUT:
    > Value of the determinant.


    Counter-challenge: TRY IT YOURSELF FIRST!

    If you get stuck, post the code here, ask specific
    questions, and you'll get plenty of help.

    -Mike
    Mike Wahler, Jan 4, 2005
    #7
  8. -berlin.de Guest

    wrote:
    > Determinant of a matrix is the modulus of it ie. |M|.
    > if M = [a b
    > c d] then
    > |M| = bc - ad


    > (I think)


    You got the sign wrong. And that's the formula for 2x2 matrices, things
    get a bit more interesting for matrices of higher ranks. Bonus points
    will be given for a program that deals reasonably with cases where the
    determinante is near to zero but the matrix elements aren't;-)

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ -berlin.de
    \__________________________ http://www.toerring.de
    -berlin.de, Jan 4, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel
    Replies:
    6
    Views:
    320
    Micah Cowan
    Sep 27, 2003
  2. Sara Khalatbari
    Replies:
    1
    Views:
    280
    Peter Hansen
    May 10, 2005
  3. Replies:
    2
    Views:
    339
  4. Replies:
    0
    Views:
    273
  5. Replies:
    0
    Views:
    237
Loading...

Share This Page