71. C Program to Create Multi Dimensional Array .
How does this program work?
- This Program is used to create Multi dimensional array using given elements.
Here is the code
#include <stdio.h>
int main(void)
{
int a[30], b[30],sum,diff,mul,div,i;
printf(" Enter First array numbers : \n");
for (i=1;i<=4;i++ )
{
scanf("%d ",& a[i]);
}
printf(" Enter Second array numbers : \n");
for (i=1;i<=4;i++ )
{
scanf("%d ",& b[i]);
}
sum=a[1]+b[1];
diff=a[2]-b[2];
mul=a[3]*b[3];
div=a[4]/b[4];
printf("Addition=%d\n",sum);
printf("Subtraction=%d\n",diff);
printf("Multiplication=%d\n",mul);
printf("Divison=%d\n",div);
return 0;
}