Programming Challenge

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • candy_init@yahoo.com

    #1

    Programming Challenge

    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

  • dandelion

    #2
    Re: Programming Challenge


    <candy_init@yah oo.com> wrote in message
    news:1104839605 .496000.102610@ z14g2000cwz.goo glegroups.com.. .[color=blue]
    > 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:[/color]

    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?



    Comment

    • Grumble

      #3
      Re: Programming Challenge

      candy_init@yaho o.com wrote:
      [color=blue]
      > The aim is to make a program in C which can calculate the value of a
      > determinant of any specified order.[/color]

      Why don't you do your own homework?

      Comment

      • Chris Croughton

        #4
        Re: Programming Challenge

        On 4 Jan 2005 03:53:25 -0800, candy_init@yaho o.com
        <candy_init@yah oo.com> wrote:
        [color=blue]
        > 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:[/color]

        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

        Comment

        • petermcmillan_uk@yahoo.com

          #5
          Re: Programming Challenge

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

          (I think)

          Comment

          • Chris Croughton

            #6
            Re: Programming Challenge

            On 4 Jan 2005 05:41:15 -0800, petermcmillan_u k@yahoo.com
            <petermcmillan_ uk@yahoo.com> wrote:
            [color=blue]
            > Determinant of a matrix is the modulus of it ie. |M|.
            > if M = [a b
            > c d] then
            >|M| = bc - ad
            >
            > (I think)[/color]

            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

            Comment

            • Mike Wahler

              #7
              Re: Programming Challenge

              <candy_init@yah oo.com> wrote in message
              news:1104839605 .496000.102610@ z14g2000cwz.goo glegroups.com.. .[color=blue]
              > 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.[/color]

              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


              Comment

              • Jens.Toerring@physik.fu-berlin.de

                #8
                Re: Programming Challenge

                petermcmillan_u k@yahoo.com wrote:[color=blue]
                > Determinant of a matrix is the modulus of it ie. |M|.
                > if M = [a b
                > c d] then
                > |M| = bc - ad[/color]
                [color=blue]
                > (I think)[/color]

                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 ___ Jens.Toerring@p hysik.fu-berlin.de
                \______________ ____________ http://www.toerring.de

                Comment

                Working...