#include<stdio.h>
int main()
{
int row, column, i, j, sum = 0;
printf("Enter Row and Column Number : ");
scanf("%d %d", &row, &column);
int anik[row][column];
printf("\nEnter Element For Matrix : \n");
for(i=0; i<row; i++)
{
for(j=0; j<column; j++)
{
scanf("%d", &anik[i][j]);
}
}
printf("\n");
for(i=0; i<row; i++)
{
for(j=0; j<column; j++)
{
sum = sum + anik[i][j];
}
printf("Row %d : ", i+1);
printf("%d\n", sum);
sum = 0;
}
return 0;
}
int main()
{
int row, column, i, j, sum = 0;
printf("Enter Row and Column Number : ");
scanf("%d %d", &row, &column);
int anik[row][column];
printf("\nEnter Element For Matrix : \n");
for(i=0; i<row; i++)
{
for(j=0; j<column; j++)
{
scanf("%d", &anik[i][j]);
}
}
printf("\n");
for(i=0; i<row; i++)
{
for(j=0; j<column; j++)
{
sum = sum + anik[i][j];
}
printf("Row %d : ", i+1);
printf("%d\n", sum);
sum = 0;
}
return 0;
}
Comments
Post a Comment