diff --git a/sparse_matrix.c b/sparse_matrix.c new file mode 100644 index 0000000..03027b9 --- /dev/null +++ b/sparse_matrix.c @@ -0,0 +1,41 @@ +#include +int main() +{ + int m,n,c,d,a[10][10],count=0; + printf(" enter the number of rows and columns:\n"); + scanf("%d%d",&m,&n); + printf("enter the element the matrix:\n"); + for(c=0;c((m*n)/2)) + { + printf("sparse matrix"); + } + else + { + printf("not a sparse matrix"); + } + return 0; +}