sum of all column in matrix in c
/* C Program to find Sum of columns in a Matrix */
#include<stdio.h>
int main()
{
int i, j, rows, columns, a[10][10], Sum;
printf("Please Enter Number of rows and columns : ");
scanf("%d %d", &i, &j);
printf("Please Enter the Matrix Row and Column Elements \n");
for(rows = 0; rows < i; rows++)
{
for(columns = 0; columns < j; columns++)
{
scanf("%d", &a[rows][columns]);
}
}
for(rows = 0; rows < i; rows++)
{
Sum = 0;
for(columns = 0; columns < j; columns++)
{
Sum = Sum + a[columns][rows];
}
printf("The Sum of Column Elements in a Matrix = %d \n", Sum );
}
return 0;
}
Also in C:
- sum of all column in matrix in c
- read file in C
- print long in c
- hopw to check how many duplicates in an array c
- how to transfer textbox fro string to integer vb.net
- how to add a comment in c
- c get first n characters of string
- es palindromo
- python 3.9 install pip cv2
- check if string starts with c
- first person view unity
- c unused parameter
- concatenate two strings in c
- casting in c
- turn a char array into double C
- scanf integer
- arduino ip to string
- factorial c program using for loop
- android is not recognized
- linux_reboot_magic2
- markdown empty line
- Multi Select with icons htm;
- clear screen c
- strdup c