From d3195f7e3ddfee31de9a85e527f967ec2c4b9bd3 Mon Sep 17 00:00:00 2001 From: Developer Sah <62435110+RahulSahOfficial@users.noreply.github.com> Date: Sun, 24 Oct 2021 01:24:19 +0530 Subject: [PATCH] Added Matrix Rotation Program --- MatrixRolling.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 MatrixRolling.c diff --git a/MatrixRolling.c b/MatrixRolling.c new file mode 100644 index 0000000..5041b7b --- /dev/null +++ b/MatrixRolling.c @@ -0,0 +1,55 @@ +#include + +void displayArray(int arr[][3],int row,int col); +int main(){ + int row,col=3; + printf("Enter no.of Rows in your matrx "); + scanf("%d",&row); + + int array[row][col]; + for(int i=0;i<4;i++){ + for(int j=0;j<3;j++){ + + printf("Enter a %d row %d column number ",i,j); + scanf("%d",&array[i][j]); + } + } + displayArray(array,row,col); +} + +void displayArray(int arr[][3],int row,int col){ + int i; + printf("Before Rotation\n"); + for(i=0;i