Thread: Print matrix

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    1

    Print matrix

    Is there an algorithm to print a matrix like this

    a[0] a[1] a[5] a[6] ..
    a[2] a[4] a[7] ..
    a[3] a[8] ..
    a[9] ..
    a[10]

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    On the assumption you know how big your array is to start, yes. (For every row/column, you can compute what number goes there.)

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by coden00b View Post
    Is there an algorithm to print a matrix like this

    a[0] a[1] a[5] a[6] ..
    a[2] a[4] a[7] ..
    a[3] a[8] ..
    a[9] ..
    a[10]
    Unfortunately, no. Numerous attempts have been made to solve such a problem, but, as of yet, none have succeeded. I'm afraid that it just isn't computable.

  4. #4
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Quote Originally Posted by Sebastiani View Post
    Unfortunately, no. Numerous attempts have been made to solve such a problem, but, as of yet, none have succeeded. I'm afraid that it just isn't computable.

    What???? I have just written a "just to see if I could do it" program that does this. . .

  5. #5
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by Kennedy View Post
    What???? I have just written a "just to see if I could do it" program that does this. . .
    I think he was being sarcastic

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 05:07 PM
  3. Scope And Parameter Passing
    By djwicks in forum C Programming
    Replies: 6
    Last Post: 03-28-2005, 08:26 PM
  4. Very handy matrix functions - part 1
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 05-20-2004, 10:38 AM
  5. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM

Tags for this Thread