Program to accept two 3 dimensional array and store subtraction of those two arrays into third array - 100 Most Important C# Programs

86. Program to accept two 3 dimensional array and store subtraction of those two arrays into third array..

Code:

#include<stdio.h>

#include<conio.h>

main( )

{

int a[3][3],b[3][3],c[3][3],i,j;

clrscr( );

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

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

{

printf(“enter two values for a[%d][%d] &

b[%d][%d]:”,i,j,i,j);

scanf(“%d%d”,&a[i][j],&b[i][j]);

}

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

{

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

{

c[i][j]=a[i][j]-b[i][j];

printf(“%d”,,c[i][j]);

}

printf(“\n”);

}

getch( );