I have problem understanding your question. So if you have any problem with the program mail me at m_gopi_m@yahoo.co.in
/*
sum of elements in an array.
*/
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
void main()
{
int i,j,sum[4];
int array[4][3]={
{1,1,1},{2,2,2},
{3,3,3},{4,4,4}
};
clrscr();
printf("\n\n Sum of the second dimension of the array is,\n");
for(i=0;i%26lt;4;i++)
{
printf("\n\n Dimension: %d",i+1);
printf("\n Elements:");
sum[i]=0;
for(j=0;j%26lt;3;j++)
{
sum[i]+=array[i][j];
printf(" %d",array[i][j]);
}
printf("\n Sum of elements: %d",sum[i]);
}
getch();
}
How can I write a c_language program for finding the sum of second diameter of the array[4][3]???please help?
mmaa try this link
http://www.google.co.uk/search?hl=en%26amp;q=H...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment