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"); + } +}