Thread: 4 questions about bidimensional table

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    5

    4 questions about bidimensional table

    Hi everyone. How can i do for scrolling the elements of a bidimentional table :

    1)Only the elements above the two diagonals.
    2)Only the elements under the two diagonals.
    3)Only the elements in the right of the two diagonals.
    4)Only the elements in the left of the two diagonals.

    Thank you!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    First you grab some graph paper (or just draw some 5x5 or 7x7 grids - can they be even sizes?)

    Then fill in a "before" and "after" sketch of what a single "scroll" event would do, and then figure out an algorithm to do it.

    Draw another one, and re-run your algorithm to see if it still works. Repeat until you have what seems a solid approach.

    When you understand the problem on paper, try and do the same thing in code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    5
    ok, i found it. Thank you!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help
    By fourseventwo in forum C Programming
    Replies: 4
    Last Post: 12-04-2010, 11:01 PM
  2. Please help me as fast as possible
    By Xbox999 in forum C Programming
    Replies: 5
    Last Post: 11-30-2009, 06:53 PM
  3. help with structs and malloc!
    By coni in forum C Programming
    Replies: 20
    Last Post: 09-14-2009, 05:38 PM
  4. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  5. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM