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

CWC
0 Min Read
#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( );

 

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version