Working of 3d array


//

//  Created by ANKIT KUMAR on 26/03/21.

//


#include <stdio.h>

int main()

{

    int i,j,k,a[3][3][3];

    for(i=0;i<3;i++)

    for(j=0;j<3;j++)

    for(k=0;k<3;k++)

    a[i][j][k]=i+j+k;

    for(i=0;i<3;i++)

    {

        printf("\n");

        

    

    for(j=0;j<3;j++)

    {

        for(k=0;k<3;k++)

        printf("%3d",a[i][j][k]);

        printf("\n");

    }

    }

}


 

Comments

Popular posts from this blog

Use of function in mathematics

My resume using HTML and CSS