From 1eb87764df017fec91af8f849e011ec474260186 Mon Sep 17 00:00:00 2001 From: anu053 <116993166+anu053@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:21:19 +0530 Subject: [PATCH] Create sparse_matrix.c sparse matrix --- sparse_matrix.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sparse_matrix.c 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; +}