#include <stdio.
h>
int main()
{
int z, x, y;
printf("Enter the no. of rows for each array you want: ");
scanf("%d", &x);
printf("Enter the no. of columns for each array you want: ");
scanf("%d", &y);
printf("Enter the no. of levels you want: ");
scanf("%d", &z);
int arr[z][x][y];
printf("\nINSERT ELEMENTS OF THE 3D ARRAY\n");
for (int i = 0; i < z; i++)
{
for (int j = 0; j < x; j++)
{
for (int k = 0; k < y; k++)
{
printf("Enter the value of the element at index (%d, %d, %d):
", i, j, k);
scanf("%d", &arr[i][j][k]);
}
}
}
printf("\nTHE 3D ARRAY\n");
for (int i = 0; i < z; i++)
{
for (int j = 0; j < x; j++)
{
for (int k = 0; k < y; k++)
{
printf("%d ", arr[i][j][k]);
}
printf("\n");
}
printf("\n \n");
}
return 0;
}