c programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • finest4u002
    New Member
    • Sep 2006
    • 2

    c programming

    write a program to print sum diagonal elements of array..
    2 d array (3,3)
  • finest4u002
    New Member
    • Sep 2006
    • 2

    #2
    c programming

    write a program to print sum of diagonal elements of array..
    2 d array (3,3)
    1 2 3
    4 5 6
    7 8 9
    print sum of 1 5 9

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      You clear understand what you need to do, I suggest you have a go at doing it.

      Comment

      • D_C
        Contributor
        • Jun 2006
        • 293

        #4
        Here is a hint. Although the array is 2D, you can treat it as 1D since you are going along the diagonal, which relates rows to columns.

        Comment

        Working...