稀疏矩阵的C程序

#include
#include
int main(){
int row,col,i,j,a[10][10],count = 0;
printf("Enter row

");
scanf("%d",&row);
printf("Enter Column

");
scanf("%d",&col);
printf("Enter Element of Matrix1

");
for(i = 0; i < row; i++){
for(j = 0; j < col; j++){
scanf("%d",&a[i][j]);
}
}
printf("Elements are:

");
for(i = 0; i < row; i++){
for(j = 0; j < col; j++){
printf("%d\t",a[i][j]);
}
printf("

");
}
/*checking sparse of matrix*/
for(i = 0; i < row; i++){
for(j = 0; j

((row * col)/2))
printf("Matrix is a sparse matrix

");
else
printf("Matrix is not sparse matrix

");
}