From 8c7c4a5cfbaf7c31f057db07e1b45915e0ceaa44 Mon Sep 17 00:00:00 2001 From: Tanya Jain Date: Thu, 24 Oct 2024 11:59:18 +0530 Subject: [PATCH] Issue #1188 Resolved --- 2D Arrays/WavePrintOfMatrix/ColumnWise.c | 38 ++++++++++++++ 2D Arrays/WavePrintOfMatrix/README.md | 67 ++++++++++++++++++++++++ 2D Arrays/WavePrintOfMatrix/RowWise.c | 38 ++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 2D Arrays/WavePrintOfMatrix/ColumnWise.c create mode 100644 2D Arrays/WavePrintOfMatrix/README.md create mode 100644 2D Arrays/WavePrintOfMatrix/RowWise.c diff --git a/2D Arrays/WavePrintOfMatrix/ColumnWise.c b/2D Arrays/WavePrintOfMatrix/ColumnWise.c new file mode 100644 index 00000000..a8518862 --- /dev/null +++ b/2D Arrays/WavePrintOfMatrix/ColumnWise.c @@ -0,0 +1,38 @@ +#include + +void ColWiseWavePrint(int rows, int cols, int matrix[rows][cols]){ + int i, j; + for(j=0; j=0; i--){ + printf("%d\t", matrix[i][j]); + } + } + } +} + +int main(){ + int rows; + printf("Enter no. of rows: "); + scanf("%d", &rows); + + int cols; + printf("Enter no. of columns: "); + scanf("%d", &cols); + + int matrix[rows][cols]; + int i, j; + for(i=0; i + +void RowWiseWavePrint(int rows, int cols, int matrix[rows][cols]){ + int i, j; + for(i=0; i=0; j--){ + printf("%d\t", matrix[i][j]); + } + } + } +} + +int main(){ + int rows; + printf("Enter no. of rows: "); + scanf("%d", &rows); + + int cols; + printf("Enter no. of columns: "); + scanf("%d", &cols); + + int matrix[rows][cols]; + int i, j; + for(i=0; i