By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

c programming

P: 2
write a program to print sum diagonal elements of array..
2 d array (3,3)
Sep 27 '06 #1
Share this Question
Share on Google+
3 Replies


P: 2
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
Sep 27 '06 #2

Banfa
Expert Mod 5K+
P: 8,916
You clear understand what you need to do, I suggest you have a go at doing it.
Sep 27 '06 #3

100+
P: 293
D_C
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.
Sep 27 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.