From dfe3893e7f25445dcef399ffcafaac4a5e56f01e Mon Sep 17 00:00:00 2001 From: Ramsakal143 <115875739+Ramsakal143@users.noreply.github.com> Date: Mon, 31 Oct 2022 00:50:35 +0530 Subject: [PATCH] find the value of last column in 3d array.c --- ...ind the value of last column in 3d array.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 C Solutions/find the value of last column in 3d array.c diff --git a/C Solutions/find the value of last column in 3d array.c b/C Solutions/find the value of last column in 3d array.c new file mode 100644 index 0000000..56581b9 --- /dev/null +++ b/C Solutions/find the value of last column in 3d array.c @@ -0,0 +1,19 @@ +// 2. wap to input a 3*3 array and print last column value each row +#include +void main() +{ + int arr[3][3],i,j; + for(i=0;i<=2;i++){ + printf("Enter the %d st rows : \n",i+1); + for(j=0;j<=2;j++){ + scanf("%d",&arr[i][j]); + } + } + for(i=0;i<=2;i++){ + for(j=0;j<=2;j++){ + if(i==2) + printf("%d\t",arr[2][j]); + } + printf("\n"); + } +}