Velocity Reviews > Programming Challenge

Programming Challenge

candy_init@yahoo.com
Guest
Posts: n/a

 01-04-2005
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
Guest
Posts: n/a

 01-04-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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

Grumble
Guest
Posts: n/a

 01-04-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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?

Chris Croughton
Guest
Posts: n/a

 01-04-2005
On 4 Jan 2005 03:53:25 -0800, (E-Mail Removed)
<(E-Mail Removed)> 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
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

petermcmillan_uk@yahoo.com
Guest
Posts: n/a

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

(I think)

Chris Croughton
Guest
Posts: n/a

 01-04-2005
On 4 Jan 2005 05:41:15 -0800, (E-Mail Removed)
<(E-Mail Removed)> wrote:

> Determinant of a matrix is the modulus of it ie. |M|.
> if M = [a b
> c d] then
>
> (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

Mike Wahler
Guest
Posts: n/a

 01-04-2005
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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

Jens.Toerring@physik.fu-berlin.de
Guest
Posts: n/a

 01-04-2005
(E-Mail Removed) 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 ___ http://www.velocityreviews.com/forums/(E-Mail Removed)-berlin.de
\__________________________ http://www.toerring.de