3 Dimensional Array

15/11/2009 03:27

 

                                 /* A Program to perform 3 Dimensional operations */
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,array[5][2][3];
printf("\n enter the values of array:");
for(i=0;i<=4;i++)
 {
  for(j=0;j<=1;j++)
    {
      for(k=0;k<=2;k++)
        {
          scanf("%d",&array[i][j][k]);
        }
    }
}
printf("\ The student details:");
for(i=0;i<=4;i++)
 {
  for(j=0;j<=1;j++)
    {
      for(k=0;k<=2;k++)
        {
          printf("%d",array[i][j][k]);
        }
   printf("\n");
   }
  printf("\n\n");
 }

}

Bookmark and Share

Done by Aarya